Skip to content

Commit 07b6696

Browse files
zahiraamjsji
authored andcommitted
[OpenMP] Fix begin_end_declare_variant.cpp
1 parent 3397799 commit 07b6696

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

clang/test/OpenMP/spirv_variant_match.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@
88

99
// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple x86_64-unknown-unknown -fopenmp-targets=spirv64-intel -emit-llvm-bc %s -o %t-host.bc -DTARGET_KIND
1010
// RUN: %clang_cc1 -verify -triple spirv64-intel -aux-triple x86_64-unknown-unknown -fopenmp -fopenmp-is-target-device \
11-
// RUN: -fopenmp-host-ir-file-path %t-host.bc -nogpulib %s -emit-llvm -DTARGET_KIND -o - | FileCheck %s
11+
// RUN: -fopenmp-host-ir-file-path %t-host.bc -nogpulib %s -emit-llvm -DTARGET_KIND -o - | FileCheck %s --check-prefix=TDK_GPU
1212

1313
// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple x86_64-unknown-unknown -fopenmp-targets=spirv64-intel -emit-llvm-bc %s -o %t-host.bc
1414
// RUN: %clang_cc1 -verify -triple spirv64-intel -aux-triple x86_64-unknown-unknown -fopenmp -fopenmp-is-target-device \
15-
// RUN: -fopenmp-host-ir-file-path %t-host.bc -nogpulib %s -emit-llvm -o - | FileCheck %s
15+
// RUN: -fopenmp-host-ir-file-path %t-host.bc -nogpulib %s -emit-llvm -o - \
16+
// RUN: | FileCheck %s --check-prefix=DK_GPU
17+
1618

1719
// expected-no-diagnostics
1820

@@ -33,9 +35,11 @@ int foo() { return 1; }
3335
#pragma omp end declare variant
3436
#pragma omp end declare target
3537

36-
// CHECK-DAG: define{{.*}} @{{"_Z[0-9]+foo\$ompvariant\$.*"}}()
38+
// CHECK-DAG: define{{.*}} @_Z3foov()
3739

38-
// CHECK-DAG: call spir_func noundef i32 @{{"_Z[0-9]+foo\$ompvariant\$.*"}}()
40+
// CHECK-DAG: call spir_func noundef i32 @_Z3foov()
41+
// TDK_GPU-DAG: call spir_func noundef i32 @"_Z25foo$ompvariant$S3$s8$Pgpuv"()
42+
// DK_GPU-DAG: call spir_func noundef i32 @"_Z25foo$ompvariant$S2$s6$Pgpuv"()
3943

4044
int main() {
4145
int res;

0 commit comments

Comments
 (0)