[llvm] [InstCombine] Fold icmp in select to smin (PR #196823)
Krishna Narayanan via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 26 07:47:42 PDT 2026
================
@@ -2100,6 +2100,45 @@ static Value *foldSelectInstWithICmpConst(SelectInst &SI, ICmpInst *ICI,
return nullptr;
}
+// a > -1 ? 1 : ( a | (+ve)value) --> smin(1, a | (+ve)value)
----------------
Krishna-13-cyber wrote:
Yes, that's correct.
https://github.com/llvm/llvm-project/pull/196823
More information about the llvm-commits
mailing list