[PATCH] D94056: [CodeGen] Update transformations to use poison for shufflevector/insertelem's initial vector elem

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 5 11:38:38 PST 2021


nikic added inline comments.


================
Comment at: llvm/lib/CodeGen/CodeGenPrepare.cpp:6725
                                               (uint64_t)0);
   Value *Shuffle = Builder.CreateShuffleVector(Insert, SVI->getShuffleMask());
   Value *BC2 = Builder.CreateBitCast(Shuffle, SVIVecType);
----------------
Wondering if you can replace this insertelement + shufflevector by a CreateVectorSplat call.


================
Comment at: llvm/lib/CodeGen/InterleavedAccessPass.cpp:401
+               cast<FixedVectorType>(BI->getOperand(0)->getType())
+                   ->getNumElements());
 
----------------
Why is this checking only the back() element? Better check all? `assert(llvm::all_of(Mask, [&](int Idx) { return Idx < ... });`


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D94056/new/

https://reviews.llvm.org/D94056



More information about the llvm-commits mailing list