[llvm] [SLP]Correctly detect minnum/maxnum patterns for select/cmp operations on floats. (PR #98570)
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 16 05:13:13 PDT 2024
================
@@ -9636,9 +9636,27 @@ BoUpSLP::getEntryCost(const TreeEntry *E, ArrayRef<Value *> VectorizedVals,
? CmpInst::BAD_FCMP_PREDICATE
: CmpInst::BAD_ICMP_PREDICATE;
- return TTI->getCmpSelInstrCost(E->getOpcode(), OrigScalarTy,
- Builder.getInt1Ty(), CurrentPred, CostKind,
- VI);
+ InstructionCost ScalarCost = TTI->getCmpSelInstrCost(
+ E->getOpcode(), OrigScalarTy, Builder.getInt1Ty(), CurrentPred,
+ CostKind, VI);
+ auto IntrinsicAndUse = canConvertToMinOrMaxIntrinsic(VI);
----------------
alexey-bataev wrote:
Done
https://github.com/llvm/llvm-project/pull/98570
More information about the llvm-commits
mailing list