[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:48:00 PST 2024
================
@@ -1898,6 +1882,55 @@ static Instruction *foldSelectICmpEq(SelectInst &SI, ICmpInst *ICI,
return nullptr;
}
+// Turn select (Cmp X C1) (BOp X C2) C3
----------------
dtcxzyw wrote:
```suggestion
/// Turn select (Cmp X C1) (BOp X C2) C3
```
Use `///` for header comments.
https://github.com/llvm/llvm-project/pull/116888
More information about the cfe-commits
mailing list