Skip to content

Commit 6466437

Browse files
committed
Add FileCheck checks
1 parent 4af1ba5 commit 6466437

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed
Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
1-
// REQUIRES: asserts
2-
31
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -target-cpu x86-64 -disable-llvm-passes -fopenmp-targets=amdgcn-amd-amdhsa -x c++ -emit-llvm-bc %s -o %t-x86-host.bc
4-
// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -aux-triple x86_64-unknown-linux-gnu -target-cpu gfx906 -fopenmp -nogpulib -fopenmp-is-target-device -fopenmp-host-ir-file-path %t-x86-host.bc -x c++ %s
2+
// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -aux-triple x86_64-unknown-linux-gnu -target-cpu gfx906 -fopenmp -nogpulib -fopenmp-is-target-device -fopenmp-host-ir-file-path %t-x86-host.bc -x c++ -emit-llvm %s -o - | FileCheck %s
53

64
// Don't crash with assertions build.
5+
6+
// CHECK: @MyGlobVar = external thread_local addrspace(1) global i32, align 4
7+
// CHECK: define weak_odr hidden noundef ptr @_ZTW9MyGlobVar() #0 comdat {
8+
// CHECK-NEXT: %1 = call align 4 ptr addrspace(1) @llvm.threadlocal.address.p1(ptr addrspace(1) align 4 @MyGlobVar)
9+
// CHECK-NEXT: %2 = addrspacecast ptr addrspace(1) %1 to ptr
10+
// CHECK-NEXT: ret ptr %2
11+
// CHECK-NEXT: }
712
int MyGlobVar;
813
#pragma omp threadprivate(MyGlobVar)
914
int main() {
1015
MyGlobVar = 1;
1116
}
17+

0 commit comments

Comments
 (0)