[clang] [clang] Recover necessary AddrSpaceCast (PR #119246)
Youngsuk Kim via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 17 05:37:56 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)
----------------
JOE1994 wrote:
(For AMDGPU codegen) Doesn't seem so to me.
https://github.com/llvm/llvm-project/pull/119246
More information about the cfe-commits
mailing list