[PATCH] D127531: [SLP]Improve analysis of same/alternate code ops and scheduling.
Valeriy Dmitriev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 26 15:31:09 PDT 2022
vdmitrie added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:1251
+ getUnderlyingObject(LI2->getPointerOperand()))
+ return LookAheadHeuristics::ScoreAltOpcodes;
return LookAheadHeuristics::ScoreFail;
----------------
ABataev wrote:
> vdmitrie wrote:
> > I'm not sure I understand why this is scored as alternating opcodes.
> > If underlying objects are same that probably means Dist variable must have a value and the value is 0.
> > i.e. these loads are from same location. right? It sounds like splat load.
> > Where alternating opcodes come from?
> No. If you have Geps with non-const indices, the Dist might be None. But the loads still may be the source of masked gather.
> No. If you have Geps with non-const indices, the Dist might be None. But the loads still may be the source of masked gather.
Ah. right. I forgot that we now vectorize non-const indices. But still, why alternate opcode?
It sounds like we need to introduce named constant dedicated to gather.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127531/new/
https://reviews.llvm.org/D127531
More information about the llvm-commits
mailing list