[PATCH] D44985: Disable zeroinitializer for CUDA shared varirable for amdgcn target

Artem Belevich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 28 10:48:26 PDT 2018


tra added inline comments.


================
Comment at: test/CodeGenCUDA/device-var-init.cu:112
 
+// NVPTX:  @_ZZ2dfvE4s_ec = internal addrspace(3) global %struct.EC zeroinitializer
+// AMDGCN: @_ZZ2dfvE4s_ec = internal addrspace(3) global %struct.EC undef
----------------
Hmm. __shared__ should not be initialized in NVPTX either. This looks like a bug in NVPTX. 

For now you should make shared uninitialized regardless of whether we're compiling for AMDGCN or NVPTX.


https://reviews.llvm.org/D44985





More information about the cfe-commits mailing list