Create test cases for the following two folds:
(icmp eq X, C) | (icmp ult Other, (X - C)) -> (icmp ule Other, (X - (C + 1)))
(icmp ne X, C) & (icmp uge Other, (X - C)) -> (icmp ugt Other, (X - (C + 1)))
Paths
| Differential D154938
[InstCombine] Test cases for D154937 ClosedPublic Authored by 0xdc03 on Jul 11 2023, 3:08 AM.
Details
Summary Create test cases for the following two folds: (icmp eq X, C) | (icmp ult Other, (X - C)) -> (icmp ule Other, (X - (C + 1)))
Diff Detail
Event Timeline0xdc03 added a child revision: D154937: [InstCombine] Generalize foldAndOrOfICmpEqZeroAndICmp.Jul 11 2023, 3:08 AM Comment Actions LGTM
This revision is now accepted and ready to land.Jul 11 2023, 6:38 AM Closed by commit rGb336f9deeba2: [InstCombine] Test cases for D154937 (authored by 0xdc03). · Explain WhyJul 11 2023, 10:44 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 539386 llvm/test/Transforms/InstCombine/and-or-icmp-const-icmp.ll
|
I'd personally save a lot of these tests -- generally we want to see one test of each "kind", but not every possible combination. So a test for eq, ne, vectors and mismatched constants each, rather than all 8 combinations of eq/ne, scalar/vector and matching/mismatching for example.