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

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 23 01:10:39 PDT 2020


RKSimon added a comment.

Why the reluctance to actually generate the min/max intrinsics?



================
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,
----------------
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


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