[PATCH] D19073: [ValueTracking] Improve isImpliedCondition for conditions with matching LHS operands and Immediate RHS operands.

Chad Rosier via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 25 15:17:51 PDT 2016


mcrosier added inline comments.

================
Comment at: lib/Analysis/ValueTracking.cpp:3808
@@ +3807,3 @@
+
+    // If the constant operands match and the predicates are swapped we can
+    // infer the second condition is false because if, for example, A > 5 is
----------------
reames wrote:
> A more general framing of a lot of this logic would be to use ConstantFoldICmp.  This wouldn't require the code duplication and would be more general.  
I'll all for no reinventing the wheel, but I'm not sure what code you're referring to.  Can you please point me in the right direction, Philip?


http://reviews.llvm.org/D19073





More information about the llvm-commits mailing list