[PATCH] D19390: folding compares for distinct allocations

Sanjoy Das via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 22 10:44:39 PDT 2016


sanjoy added a comment.

I think the code would be more obviously correct if we pass in `AI` explicitly to `isNeverEqualToUnescapedAlloc`, and change the check in `isNeverEqualToUnescapedAlloc` to `isAllocLikeFn(V, TLI) && V != AI`.  Does that sound better?  Then we wouldn't have to worry about comparing an allocation against itself.  Might also add a comment stating that we rely on `LookThroughBitCast` being false.


http://reviews.llvm.org/D19390





More information about the llvm-commits mailing list