[PATCH] D66608: [InstCombine] icmp eq/ne (gep inbounds P, Idx..), null -> icmp eq/ne P, null

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 22 16:47:41 PDT 2019


reames planned changes to this revision.
reames added a comment.

In D66608#1641754 <https://reviews.llvm.org/D66608#1641754>, @nikic wrote:

> As mentioned on the previous review, do we need to handle `getelementptr inbounds {}, {}* %p, i32 %idx`? That is, an inbounds GEP on a zero-sized type, which may be null for a non-zero index. It looks like this case is not handled in the existing code either though, so possibly this construction isn't legal (though I don't see anything to that effect in langref)?


I'm happy to add another bailout.  To be honest, the exact semantics of unsized types are not all clear to me.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66608/new/

https://reviews.llvm.org/D66608





More information about the llvm-commits mailing list