Kmeakin edited PR #6095 from icmp-and-or
to main
:
Adds ISLE rewrites for logical combinations of
icmp
(band ty (icmp ty cc1 x y) (icmp ty cc2 x y))
:
| band | eq | ne | ult | ule | ugt | uge | slt | sle | sgt | sge |
| ---- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- |
| eq | eq | false | false | eq | false | eq | false | eq | false | eq |
| ne | false | ne | ult | ult | ugt | ugt | slt | slt | sgt | sgt |
| ult | false | ult | ult | ult | false | false | N/A | N/A | N/A | N/A |
| ule | eq | ult | ult | ule | false | eq | N/A | N/A | N/A | N/A |
| ugt | false | ugt | false | false | ugt | ugt | N/A | N/A | N/A | N/A |
| uge | eq | uge | false | eq | ugt | uge | N/A | N/A | N/A | N/A |
| slt | false | slt | N/A | N/A | N/A | N/A | slt | slt | false | false |
| sle | eq | slt | N/A | N/A | N/A | N/A | slt | sle | false | eq |
| sgt | false | sgt | N/A | N/A | N/A | N/A | false | false | sgt | sgt |
| sge | eq | sgt | N/A | N/A | N/A | N/A | false | eq | sgt | sge |
(bor ty (icmp ty cc1 x y) (icmp ty cc2 x y))
:
| bor | eq | ne | ult | ule | ugt | uge | slt | sle | sgt | sge |
| --- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- |
| eq | eq | true | ule | ule | uge | uge | sle | sle | sge | sge |
| ne | true | ne | ne | true | ne | true | ne | true | ne | true |
| ult | ule | ne | ult | ule | ne | true | N/A | N/A | N/A | N/A |
| ule | ule | true | ule | ule | true | true | N/A | N/A | N/A | N/A |
| ugt | uge | ne | ne | true | ugt | uge | N/A | N/A | N/A | N/A |
| uge | uge | true | true | true | uge | uge | N/A | N/A | N/A | N/A |
| slt | sle | ne | N/A | N/A | N/A | N/A | slt | sle | ne | true |
| sle | sle | true | N/A | N/A | N/A | N/A | sle | sle | true | true |
| sgt | sge | ne | N/A | N/A | N/A | N/A | ne | true | sgt | sge |
| sge | sge | true | N/A | N/A | N/A | N/A | true | true | sge | sge |Typing out all these rules by hand is a lot of effort. Could or-patterns help?
Kmeakin updated PR #6095 from icmp-and-or
to main
.
Kmeakin updated PR #6095 from icmp-and-or
to main
.
Kmeakin edited PR #6095 from icmp-and-or
to main
:
Adds ISLE rewrites for logical combinations of
icmp
(band ty (icmp ty cc1 x y) (icmp ty cc2 x y))
:
| band | eq | ne | ult | ule | ugt | uge | slt | sle | sgt | sge |
| ---- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- |
| eq | eq | false | false | eq | false | eq | false | eq | false | eq |
| ne | false | ne | ult | ult | ugt | ugt | slt | slt | sgt | sgt |
| ult | false | ult | ult | ult | false | false | N/A | N/A | N/A | N/A |
| ule | eq | ult | ult | ule | false | eq | N/A | N/A | N/A | N/A |
| ugt | false | ugt | false | false | ugt | ugt | N/A | N/A | N/A | N/A |
| uge | eq | uge | false | eq | ugt | uge | N/A | N/A | N/A | N/A |
| slt | false | slt | N/A | N/A | N/A | N/A | slt | slt | false | false |
| sle | eq | slt | N/A | N/A | N/A | N/A | slt | sle | false | eq |
| sgt | false | sgt | N/A | N/A | N/A | N/A | false | false | sgt | sgt |
| sge | eq | sgt | N/A | N/A | N/A | N/A | false | eq | sgt | sge |
(bor ty (icmp ty cc1 x y) (icmp ty cc2 x y))
:
| bor | eq | ne | ult | ule | ugt | uge | slt | sle | sgt | sge |
| --- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- |
| eq | eq | true | ule | ule | uge | uge | sle | sle | sge | sge |
| ne | true | ne | ne | true | ne | true | ne | true | ne | true |
| ult | ule | ne | ult | ule | ne | true | N/A | N/A | N/A | N/A |
| ule | ule | true | ule | ule | true | true | N/A | N/A | N/A | N/A |
| ugt | uge | ne | ne | true | ugt | uge | N/A | N/A | N/A | N/A |
| uge | uge | true | true | true | uge | uge | N/A | N/A | N/A | N/A |
| slt | sle | ne | N/A | N/A | N/A | N/A | slt | sle | ne | true |
| sle | sle | true | N/A | N/A | N/A | N/A | sle | sle | true | true |
| sgt | sge | ne | N/A | N/A | N/A | N/A | ne | true | sgt | sge |
| sge | sge | true | N/A | N/A | N/A | N/A | true | true | sge | sge |Tests were generated by a script
Kmeakin updated PR #6095 from icmp-and-or
to main
.
Kmeakin has marked PR #6095 as ready for review.
Kmeakin updated PR #6095 from icmp-and-or
to main
.
Kmeakin updated PR #6095 from icmp-and-or
to main
.
Kmeakin updated PR #6095 from icmp-and-or
to main
.
Kmeakin updated PR #6095 from icmp-and-or
to main
.
Kmeakin updated PR #6095 from icmp-and-or
to main
.
Kmeakin requested cfallin for a review on PR #6095.
Kmeakin requested elliottt for a review on PR #6095.
Kmeakin requested fitzgen for a review on PR #6095.
Kmeakin requested jameysharp for a review on PR #6095.
Kmeakin updated PR #6095 from icmp-and-or
to main
.
jameysharp submitted PR review.
jameysharp merged PR #6095.
Last updated: Nov 22 2024 at 17:03 UTC