[clang] [llvm] [InstCombine] Fold `X > C2 ? X + C1 : C2 + C1` to `max(X, C2) + C1` (PR #116888)
Yingwei Zheng via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 25 23:47:59 PST 2024
================
@@ -1182,6 +1182,10 @@ SelectPatternResult matchDecomposedSelectPattern(
/// minimum/maximum flavor.
CmpInst::Predicate getMinMaxPred(SelectPatternFlavor SPF, bool Ordered = false);
+/// Convert given `SPF` to equivalent min/max intrinsic.
+/// Caller must ensure `SPF` is a min or max pattern.
----------------
dtcxzyw wrote:
```suggestion
/// Caller must ensure `SPF` is an integer min or max pattern.
```
https://github.com/llvm/llvm-project/pull/116888
More information about the cfe-commits
mailing list