================
@@ -1,6 +1,8 @@
 // RUN: %clang_cc1 %s -triple x86_64-apple-darwin -emit-llvm -o - | FileCheck 
%s
+// RUN: %clang_cc1 %s -triple amdgcn-amd-amdhsa -emit-llvm -o - | FileCheck %s 
--check-prefix=GLOBALAS
 
 // CHECK: @llvm.used = appending global [2 x ptr] [ptr @foo, ptr @X], section 
"llvm.metadata"
+// GLOBALAS: @llvm.compiler.used = appending addrspace(1) global [2 x ptr 
addrspace(1)] [ptr addrspace(1) addrspacecast (ptr @foo to ptr addrspace(1)), 
ptr addrspace(1) @X], section "llvm.metadata"
----------------
arsenm wrote:

Used really should use flat. It happens to be better for us that we can legally 
cast more things to addrspace(0) than to 1, but given how the IR currently 
works we should just assume used is as 0 

https://github.com/llvm/llvm-project/pull/93601
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to