on InstSimplify, simplifyUnsignedRangeCheck missed being commutative for inner equality comparison.
related Functional patch: https://reviews.llvm.org/D78430
Depends on https://reviews.llvm.org/D146195
Paths
| Differential D146196
[InstSimplify] make simplifyUnsignedRangeCheck commutative for ZeroICmp AbandonedPublic Authored by khei4 on Mar 15 2023, 11:53 PM.
Details
Summary on InstSimplify, simplifyUnsignedRangeCheck missed being commutative for inner equality comparison. Depends on https://reviews.llvm.org/D146195
Diff Detail Event TimelineComment Actions InstCombine canonicalizes constant icmp operands to the RHS, this is why constants are not usually handled on the LHS. Unless there is some PhaseOrdering reason why it is important to handle this pattern prior to the first InstCombine run, we shouldn't do this.
This revision now requires changes to proceed.Mar 16 2023, 1:31 AM Comment Actions
Oh, now I could have found that canonicalization. Thank you!
Revision Contents
Diff 505707 llvm/lib/Analysis/InstructionSimplify.cpp
llvm/test/Transforms/InstSimplify/and-or-icmp-nullptr.ll
|
You can use m_c_ICmp.