Alexey Bataev | 70d2e54 | 2019-10-08 17:47:52 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -verify -fopenmp -x c -std=c99 -ast-print %s -o - -Wno-openmp-clauses | FileCheck %s |
Alexey Bataev | bf5d429 | 2019-09-17 17:36:49 +0000 | [diff] [blame] | 2 | |
Alexey Bataev | 70d2e54 | 2019-10-08 17:47:52 +0000 | [diff] [blame] | 3 | // RUN: %clang_cc1 -verify -fopenmp-simd -x c -std=c99 -ast-print %s -o - -Wno-openmp-clauses | FileCheck %s |
Alexey Bataev | bf5d429 | 2019-09-17 17:36:49 +0000 | [diff] [blame] | 4 | |
| 5 | // expected-no-diagnostics |
| 6 | |
| 7 | int foo(void); |
| 8 | |
Alexey Bataev | 0736f7f | 2019-09-18 16:24:31 +0000 | [diff] [blame] | 9 | #pragma omp declare variant(foo) match(xxx={}, yyy={ccc}) |
Alexey Bataev | bf5d429 | 2019-09-17 17:36:49 +0000 | [diff] [blame] | 10 | #pragma omp declare variant(foo) match(xxx={vvv}) |
Johannes Doerfert | 1228d42 | 2019-12-19 20:42:12 -0600 | [diff] [blame] | 11 | #pragma omp declare variant(foo) match(implementation={vendor(score(0):llvm)}, device={kind(fpga)}) |
Alexey Bataev | 70d2e54 | 2019-10-08 17:47:52 +0000 | [diff] [blame] | 12 | #pragma omp declare variant(foo) match(implementation={vendor(llvm), xxx}) |
Alexey Bataev | 4e8231b | 2019-11-05 15:13:30 -0500 | [diff] [blame] | 13 | #pragma omp declare variant(foo) match(implementation={vendor(unknown)}, device={kind(gpu)}) |
| 14 | #pragma omp declare variant(foo) match(implementation={vendor(score(5): ibm, xxx, ibm)}, device={kind(cpu, nohost)}) |
| 15 | #pragma omp declare variant(foo) match(device={kind(host)}) |
| 16 | #pragma omp declare variant(foo) match(device={kind(nohost), xxx}) |
Alexey Bataev | bf5d429 | 2019-09-17 17:36:49 +0000 | [diff] [blame] | 17 | int bar(void); |
| 18 | |
| 19 | // CHECK: int foo(); |
Alexey Bataev | 4e8231b | 2019-11-05 15:13:30 -0500 | [diff] [blame] | 20 | // CHECK-NEXT: #pragma omp declare variant(foo) match(device={kind(nohost)}) |
| 21 | // CHECK-NEXT: #pragma omp declare variant(foo) match(device={kind(host)}) |
Johannes Doerfert | 1228d42 | 2019-12-19 20:42:12 -0600 | [diff] [blame] | 22 | // CHECK-NEXT: #pragma omp declare variant(foo) match(implementation={vendor(score(5): ibm)}, device={kind(cpu, nohost)}) |
| 23 | // CHECK-NEXT: #pragma omp declare variant(foo) match(implementation={vendor(unknown)}, device={kind(gpu)}) |
| 24 | // CHECK-NEXT: #pragma omp declare variant(foo) match(implementation={vendor(llvm)}) |
| 25 | // CHECK-NEXT: #pragma omp declare variant(foo) match(implementation={vendor(score(0): llvm)}, device={kind(fpga)}) |
Alexey Bataev | bf5d429 | 2019-09-17 17:36:49 +0000 | [diff] [blame] | 26 | // CHECK-NEXT: int bar(); |