egraphs: Canonicalize loose inequalities to strict inequalities (2nd attempt)#9040
Open
Kmeakin wants to merge 2 commits into
Open
egraphs: Canonicalize loose inequalities to strict inequalities (2nd attempt)#9040Kmeakin wants to merge 2 commits into
Kmeakin wants to merge 2 commits into
Conversation
Subscribe to Label ActionDetailsThis issue or pull request has been labeled: "cranelift", "isle"Thus the following users have been cc'd because of the following labels:
To subscribe or unsubscribe from this label, edit the |
b6aa954 to
5f9b182
Compare
elliottt
reviewed
Aug 2, 2024
Comment on lines
+84
to
+88
| ;; FIXME: triggers verifier error | ||
| ;; sge(x, c) == sgt(x, c-1), for c != SMIN. | ||
| ;; (rule (simplify (sge (fits_in_64 (ty_int bty)) x (iconst cty (u64_from_imm64 c)))) | ||
| ;; (if-let $false (u64_eq c (ty_smin cty))) | ||
| ;; (sgt bty x (iconst cty (imm64 (u64_sub c 1))))) | ||
|
|
Member
There was a problem hiding this comment.
Is the main difference to #6130 this commented out rule?
Member
There was a problem hiding this comment.
Would you mind adding a comment explaining why this is currently commented out? With that added, I think this should be good to merge 👍
Contributor
Author
There was a problem hiding this comment.
I was wrong. I thought it had been fixed, but that was just because I forgot to uncomment it
8a4ec40 to
c82d978
Compare
Add a regression test for issue bytecodealliance#6185. PR bytecodealliance#6130 will be re-applied in next commit. Copyright (c) 2024, Arm Limited. Signed-off-by: Karl Meakin <karl.meakin@arm.com>
Canonicalize `icmp` instructions: * loose inequalities to strict inequalities (eg `ult(x, c) => ult(x, c+1)`) where possible * strict inequalities to equalities (eg `ult(x, 1) => eq(x, 0)`) where possible Copyright (c) 2024, Arm Limited. Signed-off-by: Karl Meakin <karl.meakin@arm.com>
c82d978 to
978e7e6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A 2nd attempt at #6130. This time with a regression test