[PATCH] D19390: folding compares for distinct allocations
Sanjoy Das via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 22 12:58:23 PDT 2016
sanjoy accepted this revision.
sanjoy added a comment.
This revision is now accepted and ready to land.
lgtm with some nits inline. I'll check this in for you once you upload the fixed version.
================
Comment at: lib/Transforms/InstCombine/InstructionCombining.cpp:1873
@@ +1872,3 @@
+ // Two distinct allocations will never be equal.
+ // We rely on LookThroughBitCast in isAllocLikeFn being false.
+ return isAllocLikeFn(V, TLI) && V != AI;
----------------
I'd one line here on why we have that dependency. Also, it looks like you have a double space here.
================
Comment at: test/Transforms/InstCombine/compare-unescaped.ll:89
@@ +88,3 @@
+; CHECK-LABEL: compare_distinct_pointer_escape
+; CHECK_NEXT: %m = call i8* @malloc(i64 4)
+; CHECK_NEXT: tail call void @f() [ "deopt"(i8* %m) ]
----------------
Needs to be `CHECK-NEXT:`, not `CHECK_NEXT:`. The latter is an no-op.
Repository:
rL LLVM
http://reviews.llvm.org/D19390
More information about the llvm-commits
mailing list