[PATCH] D19276: folding compares if pointers do not escape

David Majnemer via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 20 17:37:12 PDT 2016


majnemer added inline comments.

================
Comment at: test/Transforms/InstCombine/compared-unescaped.ll:35
@@ +34,3 @@
+  %lgp = load i32*, i32** @gp, align 8
+  %cmp = icmp eq i32* %bc, %lgp
+  %rt = zext i1 %cmp to i32
----------------
reames wrote:
> This test case is a great example of what I mentioned to you on the phone the other day.  Regardless of whether we can elide the call to malloc, we should be able to fold this comparison to false.  
> 
> To be clear, I am not suggesting you change the current change (LGTM as well).  This would be useful future work though.  
Perhaps a FIXME should get added?


http://reviews.llvm.org/D19276





More information about the llvm-commits mailing list