[PATCH] D149731: [IR] New function llvm::createMinMaxSelectCmpOp for creating min/max operation in select-cmp form
Dávid Bolvanský via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 3 01:08:54 PDT 2023
xbolva00 added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/LoopUtils.cpp:943
+Value *llvm::createMinMaxSelectCmpOp(IRBuilderBase &Builder, RecurKind RK,
+ Value *Left, Value *Right) {
----------------
We have intrinsics for min and max. Do not emit cmp select form..
================
Comment at: llvm/lib/Transforms/Utils/LoopUtils.cpp:952
}
- CmpInst::Predicate Pred = getMinMaxReductionPredicate(RK);
- Value *Cmp = Builder.CreateCmp(Pred, Left, Right, "rdx.minmax.cmp");
----------------
Why we dont use intrinsic in all cases?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149731/new/
https://reviews.llvm.org/D149731
More information about the llvm-commits
mailing list