[PATCH] D67233: InstCombine: Fix crash on icmp of gep with addrspacecasted null

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 5 11:33:51 PDT 2019


jdoerfert added inline comments.


================
Comment at: lib/Transforms/InstCombine/InstCombineCompares.cpp:908
       !NullPointerIsDefined(I.getFunction(),
                             RHS->getType()->getPointerAddressSpace())) {
     // For most address spaces, an allocation can't be placed at null, but null
----------------
Why doesn't the `NullPointerIsDefined` check catch this and prevent the transformation in the first place?



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

https://reviews.llvm.org/D67233





More information about the llvm-commits mailing list