[llvm] [InstCombine] Fold max/min when incrementing/decrementing by 1 (PR #142466)
Alex MacLean via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 5 09:54:46 PDT 2025
================
@@ -565,6 +565,59 @@ Instruction *InstCombinerImpl::foldSelectIntoOp(SelectInst &SI, Value *TrueVal,
return nullptr;
}
+/// Try to fold a select to a min/max intrinsic. Many cases are already handled
+/// by matchDecomposedSelectPattern but here we handle the cases where more
+/// exensive modification of the IR is required.
----------------
AlexMaclean wrote:
Fixed
https://github.com/llvm/llvm-project/pull/142466
More information about the llvm-commits
mailing list