-
Notifications
You must be signed in to change notification settings - Fork 85
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: (llvm) Add support for overflow flags #3293
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3293 +/- ##
==========================================
+ Coverage 89.99% 90.02% +0.02%
==========================================
Files 445 445
Lines 55749 55898 +149
Branches 5367 5353 -14
==========================================
+ Hits 50173 50321 +148
- Misses 4166 4169 +3
+ Partials 1410 1408 -2 ☔ View full report in Codecov by Sentry. |
%add_nuw = llvm.add %arg0, %arg1 {"overflowFlags" = #llvm.overflow<nuw>} : i32 | ||
// CHECK: %add_nuw = llvm.add %arg0, %arg1 {"overflowFlags" = #llvm.overflow<nuw>} : i32 | ||
|
||
%sub = llvm.sub %arg0, %arg1 : i32 | ||
// CHECK: %sub = llvm.sub %arg0, %arg1 : i32 | ||
%add_none = llvm.add %arg0, %arg1 {"overflowFlags" = #llvm.overflow<none>} : i32 | ||
// CHECK: %add_none = llvm.add %arg0, %arg1 {"overflowFlags" = #llvm.overflow<none>} : i32 | ||
|
||
%mul = llvm.mul %arg0, %arg1 : i32 | ||
// CHECK: %mul = llvm.mul %arg0, %arg1 : i32 | ||
%add_both = llvm.add %arg0, %arg1 {"overflowFlags" = #llvm.overflow<nsw, nuw>} : i32 | ||
// CHECK: %add_both = llvm.add %arg0, %arg1 {"overflowFlags" = #llvm.overflow<nsw,nuw>} : i32 | ||
|
||
%udiv = llvm.udiv %arg0, %arg1 : i32 | ||
// CHECK: %udiv = llvm.udiv %arg0, %arg1 : i32 | ||
%add_both_reverse = llvm.add %arg0, %arg1 {"overflowFlags" = #llvm.overflow<nuw, nsw>} : i32 | ||
// CHECK: %add_both_reverse = llvm.add %arg0, %arg1 {"overflowFlags" = #llvm.overflow<nsw,nuw>} : i32 |
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 think we should be safe to remove these, the tests below with the custom syntax cover it enough, IMO
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.
Okay
I still kept one test with the complete syntax
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.
Thank you!
No description provided.