[PATCH] D94501: [SelectionDAG] Support scalable-vector splats in more cases
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 22 09:23:15 PST 2021
craig.topper added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:5035
+ } else if (VT.isScalableVector()) {
+ Shift = DAG.getSplatVector(ShVT, dl, Shifts[0]);
+ Factor = DAG.getSplatVector(VT, dl, Factors[0]);
----------------
frasercrmck wrote:
> craig.topper wrote:
> > Is there only one element in Shifts and Factors? If I'm reading matchUnaryPredicate right it will only see the single operand of the SPLAT_VECTOR so only call BuildSDIVPattern once?
> Yes, that's how it's working. Is that strong enough a thing to rely upon, do you think?
Can we put an assert on the size and everwhere else we access element 0 to make it clear we aren't dropping anything?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94501/new/
https://reviews.llvm.org/D94501
More information about the llvm-commits
mailing list