[PATCH] D89969: [SLP] Consider alternatives for cost of select instructions.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 22 13:49:19 PDT 2020
fhahn marked an inline comment as done.
fhahn added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:3550-3587
int VecCost = TTI->getCmpSelInstrCost(E->getOpcode(), VecTy, MaskTy,
CostKind, VL0);
+ // Check if the select can be folded into a min/max intrinsic and check if
+ // that is a cheaper alternative. Lowering to the actual intrinsics/target
+ // instructions is not done by SLPVectorizer and needs to be done by the
+ // backend.
+ // TODO: Support floating point min/max.
----------------
ABataev wrote:
> Maybe outline all this as a separate function, something like `static int getVectorMinMaxCost(...)`?
Done, it was getting quite big.
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