[PATCH] D45993: AMDGPU/SI: Don't promote alloca to vector for AddrSpaceCast instruction.

Yaxun Liu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 24 18:10:10 PDT 2018


yaxunl added inline comments.


================
Comment at: test/CodeGen/AMDGPU/vector-alloca-addrspacecast.ll:25
+  %tmp = getelementptr [3 x i32], [3 x i32] addrspace(5)* %alloca, i64 0, i64 %index
+  %ac = addrspacecast i32 addrspace(5)* %tmp to i32 addrspace(4)*
+  %data = load i32, i32 addrspace(4)* %ac
----------------
address space 4 is constant address space. Do you intend to cast %tmp to generic address space? If so, you should use the default address space (0) since that is generic address space.


https://reviews.llvm.org/D45993





More information about the llvm-commits mailing list