[PATCH] D14392: [ValueTracking] Teach isImpliedCondition a new bitwise trick

Sanjoy Das via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 10 16:20:36 PST 2015


sanjoy added inline comments.

================
Comment at: lib/Analysis/ValueTracking.cpp:4128
@@ +4127,3 @@
+      if (match(A, m_NUWAdd(m_Value(X), m_APInt(CA))) &&
+          match(A, m_NUWAdd(m_Specific(X), m_APInt(CB))))
+        return true;
----------------
sanjoy wrote:
> reames wrote:
> > match(B?  You have A repeated twice.
> Thanks for catching that!
> 
> When re-reading the code, I noticed something else -- the ULT and UGT clauses in `isTruePredicate` are unused / untested, since we only ever call it with `ULE` and `UGE`.  Given that, I'm inclined to remove the the unused / untested clauses (in a separate change) -- what do you think?
I removed the untested cases in r252676.


Repository:
  rL LLVM

http://reviews.llvm.org/D14392





More information about the llvm-commits mailing list