[llvm] [VectorCombine] vectorizeLoadInsert - fix shuffle when inserting into non-poison undef value (PR #119906)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 13 09:36:28 PST 2024
================
@@ -286,7 +290,7 @@ bool VectorCombine::vectorizeLoadInsert(Instruction &I) {
Value *CastedPtr =
Builder.CreatePointerBitCastOrAddrSpaceCast(SrcPtr, Builder.getPtrTy(AS));
Value *VecLd = Builder.CreateAlignedLoad(MinVecTy, CastedPtr, Alignment);
- VecLd = Builder.CreateShuffleVector(VecLd, Mask);
+ VecLd = Builder.CreateShuffleVector(VecLd, PoisonValue::get(MinVecTy), Mask);
----------------
nikic wrote:
Isn't that the default?
https://github.com/llvm/llvm-project/pull/119906
More information about the llvm-commits
mailing list