[PATCH] D127531: [SLP]Improve analysis of same/alternate code ops and scheduling.

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 26 16:17:49 PDT 2022


ABataev added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:1251
+                  getUnderlyingObject(LI2->getPointerOperand()))
+            return LookAheadHeuristics::ScoreAltOpcodes;
           return LookAheadHeuristics::ScoreFail;
----------------
vdmitrie wrote:
> ABataev wrote:
> > vdmitrie wrote:
> > > 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.
> > Because we return alternate if the distance is very big and most probably will result in masked gather with constant indices.
> That seems to only confirm my suggestion - we need to introduce dedicated named constant and fix that place too. Even though it does have same value semantics is different.
Why semnatics is different? Still same masked 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