1
1
// RUN: %clang_cc1 -triple nvptx64-nvidia-cuda -fclangir -target-cpu sm_70 \
2
2
// RUN: -fcuda-is-device -target-feature +ptx60 \
3
- // RUN: -emit-cir -o - -x cuda %s \
4
- // RUN: | FileCheck -check-prefix=CIR %s
3
+ // RUN: -emit-cir -o %t.cir -x cuda %s
4
+ // RUN: FileCheck -check-prefix=CIR --input-file=%t.cir %s
5
5
// RUN: %clang_cc1 -triple nvptx64-nvidia-cuda -fclangir -target-cpu sm_80 \
6
6
// RUN: -fcuda-is-device -target-feature +ptx65 \
7
- // RUN: -emit-cir -o - -x cuda %s \
8
- // RUN: | FileCheck -check-prefix=CIR %s
7
+ // RUN: -emit-cir -o %t.cir -x cuda %s
8
+ // RUN: FileCheck -check-prefix=CIR --input-file=%t.cir %s
9
9
// RUN: %clang_cc1 -triple nvptx64-nvidia-cuda -fclangir -target-cpu sm_80 \
10
10
// RUN: -fcuda-is-device -target-feature +ptx70 \
11
- // RUN: -emit-cir -o - -x cuda %s \
12
- // RUN: | FileCheck -check-prefix=CIR %s
11
+ // RUN: -emit-cir -o %t.cir -x cuda %s
12
+ // RUN: FileCheck -check-prefix=CIR --input-file=%t.cir %s
13
13
14
14
// RUN: %clang_cc1 -triple nvptx64-nvidia-cuda -fclangir -target-cpu sm_70 \
15
15
// RUN: -fcuda-is-device -target-feature +ptx60 \
16
- // RUN: -emit-llvm -o - -x cuda %s \
17
- // RUN: | FileCheck -check-prefix=LLVM %s
16
+ // RUN: -emit-llvm -o %t.ll -x cuda %s
17
+ // RUN: FileCheck -check-prefix=LLVM --input-file=%t.ll %s
18
18
// RUN: %clang_cc1 -triple nvptx64-nvidia-cuda -fclangir -target-cpu sm_80 \
19
19
// RUN: -fcuda-is-device -target-feature +ptx65 \
20
- // RUN: -emit-llvm -o - -x cuda %s \
21
- // RUN: | FileCheck -check-prefix=LLVM %s
20
+ // RUN: -emit-llvm -o %t.ll -x cuda %s
21
+ // RUN: FileCheck -check-prefix=LLVM --input-file=%t.ll %s
22
22
// RUN: %clang_cc1 -triple nvptx64-nvidia-cuda -fclangir -target-cpu sm_80 \
23
23
// RUN: -fcuda-is-device -target-feature +ptx70 \
24
- // RUN: -emit-llvm -o - -x cuda %s \
25
- // RUN: | FileCheck -check-prefix=LLVM %s
24
+ // RUN: -emit-llvm -o %t.ll -x cuda %s
25
+ // RUN: FileCheck -check-prefix=LLVM --input-file=%t.ll %s
26
26
27
27
// RUN: %clang_cc1 -triple nvptx64-nvidia-cuda -target-cpu sm_70 \
28
28
// RUN: -fcuda-is-device -target-feature +ptx60 \
29
- // RUN: -emit-llvm -o - -x cuda %s \
30
- // RUN: | FileCheck -check-prefix=OGCHECK %s
29
+ // RUN: -emit-llvm -o %t_og.ll -x cuda %s
30
+ // RUN: FileCheck -check-prefix=OGCHECK --input-file=%t_og.ll %s
31
31
// RUN: %clang_cc1 -triple nvptx64-nvidia-cuda -target-cpu sm_80 \
32
32
// RUN: -fcuda-is-device -target-feature +ptx65 \
33
- // RUN: -emit-llvm -o - -x cuda %s \
34
- // RUN: | FileCheck -check-prefix=OGCHECK %s
33
+ // RUN: -emit-llvm -o %t_og.ll -x cuda %s
34
+ // RUN: FileCheck -check-prefix=OGCHECK --input-file=%t_og.ll %s
35
35
// RUN: %clang_cc1 -triple nvptx64-nvidia-cuda -target-cpu sm_80 \
36
36
// RUN: -fcuda-is-device -target-feature +ptx70 \
37
- // RUN: -emit-llvm -o - -x cuda %s \
38
- // RUN: | FileCheck -check-prefix=OGCHECK %s
37
+ // RUN: -emit-llvm -o %t_og.ll -x cuda %s
38
+ // RUN: FileCheck -check-prefix=OGCHECK --input-file=%t_og.ll %s
39
39
40
40
#define __device__ __attribute__ ((device))
41
41
#define __global__ __attribute__ ((global))
@@ -52,4 +52,14 @@ __device__ void nvvm_sync(unsigned mask, int i, float f, int a, int b,
52
52
// OGCHECK: call void @llvm.nvvm.bar.warp.sync(i32
53
53
__nvvm_bar_warp_sync (mask);
54
54
55
+ // CIR: cir.llvm.intrinsic "nvvm.barrier.cta.sync.all" {{.*}} : (!u32i)
56
+ // LLVM: call void @llvm.nvvm.barrier.cta.sync.all(i32
57
+ // OGCHECK: call void @llvm.nvvm.barrier.cta.sync.all(i32
58
+ __nvvm_barrier_sync (mask);
59
+
60
+ // CIR: cir.llvm.intrinsic "nvvm.barrier.cta.sync.count" {{.*}} : (!u32i, !u32i)
61
+ // LLVM: call void @llvm.nvvm.barrier.cta.sync.count(i32
62
+ // OGCHECK: call void @llvm.nvvm.barrier.cta.sync.count(i32
63
+ __nvvm_barrier_sync_cnt (mask, i);
64
+
55
65
}
0 commit comments