[PATCH] D115661: [clang][amdgpu] - Choose when to promote VarDecl to address space 4.

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 13 14:15:45 PST 2021


yaxunl requested changes to this revision.
yaxunl added a comment.
This revision now requires changes to proceed.

This may cause perf regressions for HIP.



================
Comment at: clang/test/CodeGenCXX/cxx11-extern-constexpr.cpp:10
 // X86: @_ZN1A3FooE ={{.*}} constant i32 123, align 4
-// AMD: @_ZN1A3FooE ={{.*}} addrspace(4) constant i32 123, align 4
+// AMD: @_ZN1A3FooE ={{.*}} addrspace(1) constant i32 123, align 4
 const int *p = &A::Foo; // emit available_externally
----------------
Do you know why this is not treated as constant initialization?



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115661/new/

https://reviews.llvm.org/D115661



More information about the cfe-commits mailing list