|
1 | 1 | // REQUIRES: nvptx-registered-target
|
2 | 2 | // RUN: %clang_cc1 -ffp-contract=off -triple nvptx64-unknown-unknown -target-cpu sm_70 -target-feature +ptx63 \
|
3 |
| -// RUN: -fcuda-is-device -emit-llvm -o - -x cuda %s \ |
| 3 | +// RUN: -disable-llvm-optzns -fcuda-is-device -emit-llvm -o - -x cuda %s \ |
4 | 4 | // RUN: | FileCheck -check-prefix=CHECK -check-prefix=CHECK_PTX63_SM70 -check-prefix=LP64 %s
|
5 | 5 | // RUN: %clang_cc1 -ffp-contract=off -triple nvptx-unknown-unknown -target-cpu sm_80 -target-feature +ptx70 \
|
6 |
| -// RUN: -fcuda-is-device -emit-llvm -o - -x cuda %s \ |
| 6 | +// RUN: -disable-llvm-optzns -fcuda-is-device -emit-llvm -o - -x cuda %s \ |
7 | 7 | // RUN: | FileCheck -check-prefix=CHECK -check-prefix=CHECK_PTX70_SM80 -check-prefix=LP32 %s
|
8 | 8 | // RUN: %clang_cc1 -ffp-contract=off -triple nvptx64-unknown-unknown -target-cpu sm_80 -target-feature +ptx70 \
|
9 |
| -// RUN: -fcuda-is-device -emit-llvm -o - -x cuda %s \ |
| 9 | +// RUN: -disable-llvm-optzns -fcuda-is-device -emit-llvm -o - -x cuda %s \ |
10 | 10 | // RUN: | FileCheck -check-prefix=CHECK -check-prefix=CHECK_PTX70_SM80 -check-prefix=LP64 %s
|
11 | 11 | // RUN: %clang_cc1 -ffp-contract=off -triple nvptx-unknown-unknown -target-cpu sm_60 -target-feature +ptx62 \
|
12 |
| -// RUN: -fcuda-is-device -emit-llvm -o - -x cuda %s \ |
| 12 | +// RUN: -disable-llvm-optzns -fcuda-is-device -emit-llvm -o - -x cuda %s \ |
13 | 13 | // RUN: | FileCheck -check-prefix=CHECK -check-prefix=LP32 %s
|
14 | 14 | // RUN: %clang_cc1 -ffp-contract=off -triple nvptx64-unknown-unknown -target-cpu sm_60 -target-feature +ptx62 \
|
15 |
| -// RUN: -fcuda-is-device -emit-llvm -o - -x cuda %s \ |
| 15 | +// RUN: -disable-llvm-optzns -fcuda-is-device -emit-llvm -o - -x cuda %s \ |
16 | 16 | // RUN: | FileCheck -check-prefix=CHECK -check-prefix=LP64 %s
|
17 | 17 | // RUN: %clang_cc1 -ffp-contract=off -triple nvptx64-unknown-unknown -target-cpu sm_61 -target-feature +ptx62 \
|
18 |
| -// RUN: -fcuda-is-device -emit-llvm -o - -x cuda %s \ |
| 18 | +// RUN: -disable-llvm-optzns -fcuda-is-device -emit-llvm -o - -x cuda %s \ |
19 | 19 | // RUN: | FileCheck -check-prefix=CHECK -check-prefix=LP64 %s
|
20 | 20 | // RUN: %clang_cc1 -triple nvptx-unknown-unknown -target-cpu sm_53 -target-feature +ptx62 \
|
21 | 21 | // RUN: -DERROR_CHECK -fcuda-is-device -S -o /dev/null -x cuda -verify %s
|
22 | 22 | // RUN: %clang_cc1 -ffp-contract=off -triple nvptx-unknown-unknown -target-cpu sm_86 -target-feature +ptx72 \
|
23 |
| -// RUN: -fcuda-is-device -emit-llvm -o - -x cuda %s \ |
| 23 | +// RUN: -disable-llvm-optzns -fcuda-is-device -emit-llvm -o - -x cuda %s \ |
24 | 24 | // RUN: | FileCheck -check-prefix=CHECK -check-prefix=CHECK_PTX72_SM86 -check-prefix=LP32 %s
|
25 | 25 | // RUN: %clang_cc1 -ffp-contract=off -triple nvptx64-unknown-unknown -target-cpu sm_86 -target-feature +ptx72 \
|
26 |
| -// RUN: -fcuda-is-device -emit-llvm -o - -x cuda %s \ |
| 26 | +// RUN: -disable-llvm-optzns -fcuda-is-device -emit-llvm -o - -x cuda %s \ |
27 | 27 | // RUN: | FileCheck -check-prefix=CHECK -check-prefix=CHECK_PTX72_SM86 -check-prefix=LP64 %s
|
28 | 28 | // RUN: %clang_cc1 -ffp-contract=off -triple nvptx64-unknown-unknown -target-cpu sm_89 -target-feature +ptx81 \
|
29 |
| -// RUN: -fcuda-is-device -emit-llvm -o - -x cuda %s \ |
| 29 | +// RUN: -disable-llvm-optzns -fcuda-is-device -emit-llvm -o - -x cuda %s \ |
30 | 30 | // RUN: | FileCheck -check-prefix=CHECK -check-prefix=CHECK_PTX81_SM89 %s
|
31 | 31 | // ### The last run to check with the highest SM and PTX version available
|
32 | 32 | // ### to make sure target builtins are still accepted.
|
33 | 33 | // RUN: %clang_cc1 -ffp-contract=off -triple nvptx64-unknown-unknown -target-cpu sm_100a -target-feature +ptx87 \
|
34 |
| -// RUN: -fcuda-is-device -emit-llvm -o - -x cuda %s \ |
| 34 | +// RUN: -disable-llvm-optzns -fcuda-is-device -emit-llvm -o - -x cuda %s \ |
35 | 35 | // RUN: | FileCheck -check-prefix=CHECK -check-prefix=CHECK_PTX81_SM89 %s
|
36 | 36 |
|
37 | 37 | #define __device__ __attribute__((device))
|
@@ -61,6 +61,7 @@ __device__ bool reflect() {
|
61 | 61 |
|
62 | 62 | unsigned x = __nvvm_reflect("__CUDA_ARCH");
|
63 | 63 | return x >= 700;
|
| 64 | + |
64 | 65 | }
|
65 | 66 |
|
66 | 67 | __device__ int read_ntid() {
|
|
0 commit comments