-
lib/Transforms/InstCombine/ 18/19
InstCombineCompares.cpp -
test/Transforms/InstCombine/
| | Authored by junaire on Apr 5 2023, 1:52 AM. Event TimelineHerald added a project: Restricted Project. junaire requested review of this revision. Herald added a project: Restricted Project. junaire retitled this revision from [InstCombine] Fold icmp(Positive1 * X * Y + Positive2) --> icmp(X * Y) to [InstCombine] Fold icmp(bin(X, Y) + Positive2) --> icmp(bin(X, Y)). junaire retitled this revision from [InstCombine] Fold icmp(bin(X, Y) + Positive2) --> icmp(bin(X, Y)) to [InstCombine] Fold icmp(bin(X, Y) + Positive) --> icmp(bin(X, Y)). junaire retitled this revision from [InstCombine] Fold icmp(bin(X, Y) + Positive) --> icmp(bin(X, Y)) to [InstCombine] Fold icmp(bin(X, Y) | LHS, RHS) --> icmp(bin(X, Y)) iff LHS > RHS s>= 0. junaire retitled this revision from [InstCombine] Fold icmp(bin(X, Y) | LHS, RHS) --> icmp(bin(X, Y)) iff LHS > RHS s>= 0 to [InstCombine] icmp(X | LHS, RHS) --> icmp(X, 0) iff LHS > RHS s>= 0. junaire retitled this revision from [InstCombine] icmp(X | LHS, RHS) --> icmp(X, 0) iff LHS > RHS s>= 0 to [InstCombine] icmp(X | LHS, RHS) --> icmp(X, 0). junaire retitled this revision from [InstCombine] icmp(X | LHS, RHS) --> icmp(X, 0) to [InstCombine] icmp(X | LHS, C) --> icmp(X, 0). junaire marked an inline comment as done. junaire marked an inline comment as done. This revision is now accepted and ready to land. nikic added inline comments. junaire marked 11 inline comments as done. junaire marked an inline comment as done. nikic added inline comments. nikic added inline comments. junaire retitled this revision from [InstCombine] icmp(X | LHS, C) --> icmp(X, 0) to [InstCombine] icmp(X | OrC, C) --> icmp(X, 0). junaire marked 3 inline comments as done. nikic accepted this revision. nikic added inline comments. This revision was automatically updated to reflect the committed changes. Path | Size |
---|
| | | lib/ | Transforms/ | InstCombine/ |
| | | 35 lines | | test/ | Transforms/ | InstCombine/ |
| | | 24 lines |
Commit | Tree | Parents | Author | Summary | Date |
---|
d687d7a673e5 | 71e9a7a89598 | e2a4d5225009 | Jun Zhang | [InstCombine] icmp(X | LHS, RHS) --> icmp(X, 0) (Show More…) | Apr 7 2023, 7:53 PM |
|
I don't think this matches the alive2 link you have. You only verify for RHS == 0, but here you seem to take any positive value.
Can you update the alive2 link (or the code). Also the alive2 link seems to have spurious nsw flags on the mul. Verifies w.o the nsw flags so nbd.