[PATCH] D18905: [ValueTracking] Improve isImpliedCondition for conditions with matching operands.

Geoff Berry via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 14 11:03:31 PDT 2016


gberry added a comment.

Added a couple of comments, still looking over other bits of the change...


================
Comment at: lib/Analysis/ValueTracking.cpp:3903
@@ -3799,3 +3902,3 @@
   // LHS ==> RHS by definition
   if (LHS == RHS) return true;
 
----------------
The value returned in ImpliedTrue is undefined (and may be checked by the caller) if this path is taken.

================
Comment at: lib/Transforms/Scalar/JumpThreading.cpp:939
@@ -936,1 +938,3 @@
     }
+    // FIXME: If ImpliedTrue == false we should unconditionally branch to the
+    // false edge.
----------------
This seems like an easy thing to go ahead and fix.  Just factor out the 0 and 1 successor indices above and swap them if ImpliedTrue is false, right?


http://reviews.llvm.org/D18905





More information about the llvm-commits mailing list