File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 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: }
712int MyGlobVar;
813#pragma omp threadprivate(MyGlobVar)
914int main () {
1015 MyGlobVar = 1 ;
1116}
17+
You can’t perform that action at this time.
0 commit comments