-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
egraphs: Canonicalize loose inequalities to strict inequalities (2nd attempt) #9040
base: main
Are you sure you want to change the base?
egraphs: Canonicalize loose inequalities to strict inequalities (2nd attempt) #9040
Conversation
Subscribe to Label Action
This 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
cranelift/codegen/src/opts/icmp.isle
Outdated
;; 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))))) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the main difference to #6130 this commented out rule?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you mind adding a comment explaining why this is currently commented out? With that added, I think this should be good to merge 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it has been fixed by 0683b84
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it be un-commented now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
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 <[email protected]>
c82d978
to
978e7e6
Compare
A 2nd attempt at #6130. This time with a regression test