[PATCH] D89969: [SLP] Consider alternatives for cost of select instructions.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 23 08:02:45 PDT 2020


fhahn added a comment.





================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:3378
+// return the cost for that variant.
+static int getVectorMinMaxCost(ArrayRef<Value *> VL, Type *VecTy, Type *MaskTy,
+                               TTI::TargetCostKind CostKind,
----------------
RKSimon wrote:
> samparker wrote:
> > Maybe this should be part of TTI? There's already static methods for reduction matching and could this logic not also be useful for the loop vectorizer?
> Yes - it'd be great to move most of this into TTI or Utils/Local.cpp
Sounds good. I moved the matching part to ValueTracking. It does not seem like the ideal location, but it is where the related SelectPatternResult helpers live.

> could this logic not also be useful for the loop vectorizer?

yep, this is something I am planning on looking into shortly as a follow up.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D89969



More information about the llvm-commits mailing list