[PATCH] D35975: AMDGPU: Look through a bitcast user of an out argument

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 27 23:12:30 PDT 2017

arsenm added inline comments.

Comment at: lib/Target/AMDGPU/AMDGPURewriteOutArguments.cpp:386
+            DL->getTypeSizeInBits(Val->getType())) {
+          assert(isVec3ToVec4Shuffle(EffectiveEltTy, Val->getType()));
+          Val = B.CreateShuffleVector(Val, UndefValue::get(Val->getType()),
rampitec wrote:
> That is probably legal for a source to cast pointer argument to anything. Looks like you need to check if that is a special case you are looking for rather than asserting.
checkArgumentUses filter those out earlier. For our datalayout the only case where this should happen is the 3 vector case since the alignment is specifically set to be the same as the 4 element case.


More information about the llvm-commits mailing list