[llvm] [InstSimplify] Simplify the select with integer comparison relationship (PR #66668)

via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 19 06:15:13 PDT 2023


================
@@ -8285,6 +8285,15 @@ static std::optional<bool> isImpliedCondICmps(const ICmpInst *LHS,
   if (areMatchingOperands(L0, L1, R0, R1, AreSwappedOps))
     return isImpliedCondMatchingOperands(LPred, RPred, AreSwappedOps);
 
+  if (RPred == ICmpInst::ICMP_SLT) {
+    Value *X;
+    Value *Y;
+    // x-y+1 is positive when x >= y or non-positive when x < y
----------------
vfdff wrote:

ok, thanks.

https://github.com/llvm/llvm-project/pull/66668


More information about the llvm-commits mailing list