[ValueTracking] refactor: extract method haveNoCommonBitsSet
[oota-llvm.git] / include / llvm / Analysis / ValueTracking.h
index c0b84fb33459e8abef4cadacbb19fd513b2f9b59..32b3805b229b8a65665de5ab0f20adf72c0df2ac 100644 (file)
@@ -47,6 +47,11 @@ namespace llvm {
   /// \p KnownZero the set of bits that are known to be zero
   void computeKnownBitsFromRangeMetadata(const MDNode &Ranges,
                                          APInt &KnownZero);
+  /// Returns true if LHS and RHS have no common bits set.
+  bool haveNoCommonBitsSet(Value *LHS, Value *RHS, const DataLayout &DL,
+                           AssumptionCache *AC = nullptr,
+                           const Instruction *CxtI = nullptr,
+                           const DominatorTree *DT = nullptr);
 
   /// ComputeSignBit - Determine whether the sign bit is known to be zero or
   /// one.  Convenience wrapper around computeKnownBits.