[PATCH] D19549: Fold compares irrespective of whether allocation can be elided

Sanjoy Das via llvm-commits llvm-commits at lists.llvm.org
Mon May 2 14:00:17 PDT 2016


sanjoy accepted this revision.
sanjoy added a comment.
This revision is now accepted and ready to land.

This LGTM, but can you please add a test for `ne` specifically and one or two negative tests for inequality?


================
Comment at: lib/Analysis/InstructionSimplify.cpp:3046
@@ -3029,3 +3045,3 @@
   if (LHS->getType()->isPointerTy())
-    if (Constant *C = computePointerICmp(Q.DL, Q.TLI, Pred, LHS, RHS))
+    if (Constant *C = computePointerICmp(Q.DL, Q.TLI, Q.DT, Pred, Q.CxtI, LHS, RHS))
       return C;
----------------
This line is too long.  I think just changing `Constant` to `auto` will fix it, otherwise please wrap.


Repository:
  rL LLVM

http://reviews.llvm.org/D19549





More information about the llvm-commits mailing list