[PATCH] D94056: [CodeGen] Update transformations to use poison for shufflevector/insertelem's initial vector elem
Juneyoung Lee via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 5 20:11:58 PST 2021
aqjune added inline comments.
================
Comment at: llvm/lib/CodeGen/InterleavedAccessPass.cpp:362
return false;
if (cast<Instruction>(Shuffle->getOperand(0))->getOperand(0) == LI)
----------------
spatel wrote:
> Could we also assert here (and/or in the loop above this one) that:
> VecTy->getNumElements() < Shuffle->getShuffleMask().size()
> ?
>
> Ie, the shuffle is always reducing the number of elements from the input vector operands?
Yes, I'll add one.
================
Comment at: llvm/lib/CodeGen/InterleavedAccessPass.cpp:401
+ cast<FixedVectorType>(BI->getOperand(0)->getType())
+ ->getNumElements());
----------------
nikic wrote:
> Why is this checking only the back() element? Better check all? `assert(llvm::all_of(Mask, [&](int Idx) { return Idx < ... });`
It was simply because of its cost. Actually I was wondering whether it is acceptable to have such formula in the assertion.
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