[PATCH] D79738: [AMDGPU] Fix promote alloca which is already vector
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 11 13:28:52 PDT 2020
arsenm added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp:489-490
StoreInst *SI = cast<StoreInst>(Inst);
- if (SI->getValueOperand()->getType() == AllocaTy)
+ if (SI->getValueOperand()->getType() == AllocaTy ||
+ SI->getValueOperand()->getType()->isVectorTy())
break;
----------------
isAggregateType might be safer?
================
Comment at: llvm/test/CodeGen/AMDGPU/vector-alloca-bitcast.ll:363
+ %alloca = alloca <4 x float>, align 16, addrspace(5)
+ %cast = bitcast <4 x float> addrspace(5)* %alloca to <4 x i32> addrspace(5)*
+ store <4 x i32> <i32 1, i32 2, i32 3, i32 4>, <4 x i32> addrspace(5)* %cast
----------------
What if the load was with a smaller vector, or a bitcast to a different aggregate type/
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79738/new/
https://reviews.llvm.org/D79738
More information about the llvm-commits
mailing list