Open llvmbot opened 3 years ago
NVPTX backend does not support dynamic initialization.
.global .align 8 .u64 _const$_Z6kernelv$_ptr[1] = {generic(_ZZ6kernelvE3mem)};
I think PTXAS is unhappy about the generic(_ZZ6kernelvE3mem)
here because _ZZ6kernelvE3mem
no longer exist after demotion. In other words demotion shoudld not have happened if there are still references to the symbol.
assigned to @Artem-B
Extended Description
Aggregate-initializing a struct from an immediate pointer-to-shared-memory produces invalid PTX:
Compiled with
results in
which ptxas rejects:
This issue does not appear with -O1/-O2/-O3. In the unoptimized case it can be worked around by storing the pointer in a temporary first or by adding an explicit constructor to the struct.