-
Notifications
You must be signed in to change notification settings - Fork 73
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
dialects: (arith) select canonicalization patterns #3368
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3368 +/- ##
==========================================
- Coverage 90.10% 90.10% -0.01%
==========================================
Files 449 449
Lines 56686 56719 +33
Branches 5443 5451 +8
==========================================
+ Hits 51079 51107 +28
- Misses 4168 4170 +2
- Partials 1439 1442 +3 ☔ View full report in Codecov by Sentry. |
arith.select %x %true %false = %x | ||
arith.select %x %false %true = %x xor 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.
For an i1
result type you may even consider folding the %true %true
and %false %false
cases if you think they may realistically come up.
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.
More generally, arith.select %x %y %y
should be %y right? I realise I didn't include this as I didn't immediately find it in mlir but it would probably be nice to add
79cf439
to
fb761d1
Compare
Added select x y y = y and rebased |
Adds some simple canonicalization patterns for
arith.select