[SCEV] Teach SCEV some axioms about non-wrapping arithmetic
[oota-llvm.git] / include / llvm / Analysis / ScalarEvolution.h
index d70f9d6fe42e5d652da129d08b9aed962241b894..0413b6849bdb1ed9b184fc6f123e0884cdd0c030 100644 (file)
@@ -576,6 +576,14 @@ namespace llvm {
     bool isKnownPredicateWithRanges(ICmpInst::Predicate Pred,
                                     const SCEV *LHS, const SCEV *RHS);
 
+    /// Try to prove the condition described by "LHS Pred RHS" by ruling out
+    /// integer overflow.
+    ///
+    /// For instance, this will return true for "A s< (A + C)<nsw>" if C is
+    /// positive.
+    bool isKnownPredicateViaNoOverflow(ICmpInst::Predicate Pred,
+                                       const SCEV *LHS, const SCEV *RHS);
+
     /// Try to split Pred LHS RHS into logical conjunctions (and's) and try to
     /// prove them individually.
     bool isKnownPredicateViaSplitting(ICmpInst::Predicate Pred, const SCEV *LHS,