[llvm] [ConstraintElim] Simplify `sadd_with_overflow` if A and B have different signs (PR #135784)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 30 01:23:08 PDT 2025


================
@@ -1673,6 +1674,38 @@ void ConstraintInfo::addFactImpl(CmpInst::Predicate Pred, Value *A, Value *B,
   }
 }
 
+static bool replaceAddOverflowUses(IntrinsicInst *II, Value *A, Value *B,
----------------
dtcxzyw wrote:

We can merge this function with `replaceSubOverflowUses` to avoid duplication.

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


More information about the llvm-commits mailing list