Yaxun Liu | 02c3979 | 2016-07-13 21:21:05 +0000 | [diff] [blame] | 1 | // RUN: %clang -S -### -cl-std=CL %s 2>&1 | FileCheck --check-prefix=CHECK-CL %s |
| 2 | // RUN: %clang -S -### -cl-std=CL1.1 %s 2>&1 | FileCheck --check-prefix=CHECK-CL11 %s |
| 3 | // RUN: %clang -S -### -cl-std=CL1.2 %s 2>&1 | FileCheck --check-prefix=CHECK-CL12 %s |
| 4 | // RUN: %clang -S -### -cl-std=CL2.0 %s 2>&1 | FileCheck --check-prefix=CHECK-CL20 %s |
Anastasia Stulova | c645f61 | 2018-04-12 14:17:04 +0000 | [diff] [blame] | 5 | // RUN: %clang -S -### -cl-std=c++ %s 2>&1 | FileCheck --check-prefix=CHECK-CLCPP %s |
Yaxun Liu | 02c3979 | 2016-07-13 21:21:05 +0000 | [diff] [blame] | 6 | // RUN: %clang -S -### -cl-opt-disable %s 2>&1 | FileCheck --check-prefix=CHECK-OPT-DISABLE %s |
| 7 | // RUN: %clang -S -### -cl-strict-aliasing %s 2>&1 | FileCheck --check-prefix=CHECK-STRICT-ALIASING %s |
| 8 | // RUN: %clang -S -### -cl-single-precision-constant %s 2>&1 | FileCheck --check-prefix=CHECK-SINGLE-PRECISION-CONST %s |
| 9 | // RUN: %clang -S -### -cl-finite-math-only %s 2>&1 | FileCheck --check-prefix=CHECK-FINITE-MATH-ONLY %s |
| 10 | // RUN: %clang -S -### -cl-kernel-arg-info %s 2>&1 | FileCheck --check-prefix=CHECK-KERNEL-ARG-INFO %s |
| 11 | // RUN: %clang -S -### -cl-unsafe-math-optimizations %s 2>&1 | FileCheck --check-prefix=CHECK-UNSAFE-MATH-OPT %s |
| 12 | // RUN: %clang -S -### -cl-fast-relaxed-math %s 2>&1 | FileCheck --check-prefix=CHECK-FAST-RELAXED-MATH %s |
| 13 | // RUN: %clang -S -### -cl-mad-enable %s 2>&1 | FileCheck --check-prefix=CHECK-MAD-ENABLE %s |
| 14 | // RUN: %clang -S -### -cl-no-signed-zeros %s 2>&1 | FileCheck --check-prefix=CHECK-NO-SIGNED-ZEROS %s |
| 15 | // RUN: %clang -S -### -cl-denorms-are-zero %s 2>&1 | FileCheck --check-prefix=CHECK-DENORMS-ARE-ZERO %s |
Yaxun Liu | ffb6090 | 2016-08-09 20:10:18 +0000 | [diff] [blame] | 16 | // RUN: %clang -S -### -cl-fp32-correctly-rounded-divide-sqrt %s 2>&1 | FileCheck --check-prefix=CHECK-ROUND-DIV %s |
Alexey Sotkin | 20f6592 | 2018-02-22 11:54:14 +0000 | [diff] [blame] | 17 | // RUN: %clang -S -### -cl-uniform-work-group-size %s 2>&1 | FileCheck --check-prefix=CHECK-UNIFORM-WG %s |
Yaxun Liu | 02c3979 | 2016-07-13 21:21:05 +0000 | [diff] [blame] | 18 | // RUN: not %clang -cl-std=c99 -DOPENCL %s 2>&1 | FileCheck --check-prefix=CHECK-C99 %s |
| 19 | // RUN: not %clang -cl-std=invalid -DOPENCL %s 2>&1 | FileCheck --check-prefix=CHECK-INVALID %s |
Yaxun Liu | b5f176e | 2016-06-29 19:39:32 +0000 | [diff] [blame] | 20 | |
Benjamin Kramer | 09a9c55 | 2016-07-14 15:06:57 +0000 | [diff] [blame] | 21 | // CHECK-CL: "-cc1" {{.*}} "-cl-std=CL" |
| 22 | // CHECK-CL11: "-cc1" {{.*}} "-cl-std=CL1.1" |
| 23 | // CHECK-CL12: "-cc1" {{.*}} "-cl-std=CL1.2" |
| 24 | // CHECK-CL20: "-cc1" {{.*}} "-cl-std=CL2.0" |
Anastasia Stulova | c645f61 | 2018-04-12 14:17:04 +0000 | [diff] [blame] | 25 | // CHECK-CLCPP: "-cc1" {{.*}} "-cl-std=c++" |
Benjamin Kramer | 09a9c55 | 2016-07-14 15:06:57 +0000 | [diff] [blame] | 26 | // CHECK-OPT-DISABLE: "-cc1" {{.*}} "-cl-opt-disable" |
| 27 | // CHECK-STRICT-ALIASING: "-cc1" {{.*}} "-cl-strict-aliasing" |
| 28 | // CHECK-SINGLE-PRECISION-CONST: "-cc1" {{.*}} "-cl-single-precision-constant" |
| 29 | // CHECK-FINITE-MATH-ONLY: "-cc1" {{.*}} "-cl-finite-math-only" |
| 30 | // CHECK-KERNEL-ARG-INFO: "-cc1" {{.*}} "-cl-kernel-arg-info" |
| 31 | // CHECK-UNSAFE-MATH-OPT: "-cc1" {{.*}} "-cl-unsafe-math-optimizations" |
| 32 | // CHECK-FAST-RELAXED-MATH: "-cc1" {{.*}} "-cl-fast-relaxed-math" |
| 33 | // CHECK-MAD-ENABLE: "-cc1" {{.*}} "-cl-mad-enable" |
| 34 | // CHECK-NO-SIGNED-ZEROS: "-cc1" {{.*}} "-cl-no-signed-zeros" |
| 35 | // CHECK-DENORMS-ARE-ZERO: "-cc1" {{.*}} "-cl-denorms-are-zero" |
Yaxun Liu | ffb6090 | 2016-08-09 20:10:18 +0000 | [diff] [blame] | 36 | // CHECK-ROUND-DIV: "-cc1" {{.*}} "-cl-fp32-correctly-rounded-divide-sqrt" |
Alexey Sotkin | 20f6592 | 2018-02-22 11:54:14 +0000 | [diff] [blame] | 37 | // CHECK-UNIFORM-WG: "-cc1" {{.*}} "-cl-uniform-work-group-size" |
Yaxun Liu | 02c3979 | 2016-07-13 21:21:05 +0000 | [diff] [blame] | 38 | // CHECK-C99: error: invalid value 'c99' in '-cl-std=c99' |
| 39 | // CHECK-INVALID: error: invalid value 'invalid' in '-cl-std=invalid' |
Yaxun Liu | b5044fe | 2016-06-17 17:19:28 +0000 | [diff] [blame] | 40 | |
| 41 | kernel void func(void); |