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

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 22 13:32:40 PDT 2019


nikic added a comment.

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)?


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

https://reviews.llvm.org/D66608





More information about the llvm-commits mailing list