[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
Fri Aug 23 00:33:16 PDT 2019
nikic accepted this revision.
nikic added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: lib/Transforms/InstCombine/InstCombineCompares.cpp:911
+ // 3) Base != nullptr, Index == (-base) -> poison (crossing allocations)
+ // 4) Base != nullptr, Index != (-base) -> nonnull (and possibly poison)
+ //
----------------
I'd suggest changing Index -> Offset in these comments.
================
Comment at: test/Transforms/InstCombine/gep-inbounds-null.ll:36
+ %gep = getelementptr inbounds i8, i8* null, i64 0
+ %cnd = icmp ne i8* %gep, null
+ ret i1 %cnd
----------------
Should be eq?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66608/new/
https://reviews.llvm.org/D66608
More information about the llvm-commits
mailing list