[ValueTracking] Expose `implies` via ValueTracking, NFC
[oota-llvm.git] / include / llvm / Analysis / ValueTracking.h
index f9e0386a4ed70d1f5c4fe3d60770d0d4da83e857..6d5f4ac0ad26f5c69caa800ab77bdf6e216b26f9 100644 (file)
@@ -436,6 +436,15 @@ namespace llvm {
   /// E.g. if RangeMD is !{i32 0, i32 10, i32 15, i32 20} then return [0, 20).
   ConstantRange getConstantRangeFromMetadata(MDNode &RangeMD);
 
+  /// Return true if RHS is known to be implied by LHS.  A & B must be i1
+  /// (boolean) values or a vector of such values. Note that the truth table for
+  /// implication is the same as <=u on i1 values (but not <=s!).  The truth
+  /// table for both is:
+  ///    | T | F (B)
+  ///  T | T | F
+  ///  F | T | T
+  /// (A)
+  bool isImpliedCondition(Value *LHS, Value *RHS);
 } // end namespace llvm
 
 #endif