CreateCoercedLoad/CreateCoercedStore assumes pointer argument of
memcpy is in addr space 0, which is not correct and causes invalid
bitcasts for triple amdgcn---amdgiz.
It is fixed by using alloca addr space instead.
Paths
| Differential D40806
CodeGen: Fix invalid bitcasts for memcpy ClosedPublic Authored by yaxunl on Dec 4 2017, 2:31 PM.
Details Summary CreateCoercedLoad/CreateCoercedStore assumes pointer argument of It is fixed by using alloca addr space instead.
Diff Detail
Event TimelineThis revision is now accepted and ready to land.Dec 6 2017, 8:30 AM Closed by commit rL320000: CodeGen: Fix invalid bitcasts for memcpy (authored by yaxunl). · Explain WhyDec 6 2017, 5:40 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 125863 cfe/trunk/lib/CodeGen/CGCall.cpp
cfe/trunk/test/CodeGenOpenCL/amdgpu-abi-struct-coerce.cl
|
There is a CreateElementBitCast method on CGBuilderTy that preserves the source address space; that seems like the obviously correct fix here instead of assuming any specific address space on either operand.