[clang] [clang] Recover necessary AddrSpaceCast (PR #119246)
Matt Arsenault via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 16 18:11:33 PST 2024
================
@@ -0,0 +1,16 @@
+// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -aux-triple x86_64-unknown-linux-gnu -target-cpu gfx906 -fopenmp -nogpulib -fopenmp-is-target-device -emit-llvm %s -o - | FileCheck %s
+
+// Don't crash with assertions build.
+
+// CHECK: @MyGlobVar = external thread_local addrspace(1) global i32, align 4
+// CHECK: define weak_odr hidden noundef ptr @_ZTW9MyGlobVar() #0 comdat {
+// CHECK-NEXT: %1 = call align 4 ptr addrspace(1) @llvm.threadlocal.address.p1(ptr addrspace(1) align 4 @MyGlobVar)
----------------
arsenm wrote:
Do we support this intrinsic?
https://github.com/llvm/llvm-project/pull/119246
More information about the cfe-commits
mailing list