-
Notifications
You must be signed in to change notification settings - Fork 130
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
[CIR] Implement ::verify for cir.atomic.xchg and cir.atomic.cmp_xchg #1431
base: main
Are you sure you want to change the base?
Conversation
@bcardosolopes is this the expected result? Failure at |
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.
Thanks, this is great! To add a testcase, see clang/test/CIR/IR/invalid.cir
for inspiration
@bcardosolopes I corrected the code where requested and added the tests ( |
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.
Awesome, thanks!
I'll land once tests pass |
✅ With the latest revision this PR passed the C/C++ code formatter. |
clang-format issues need fixing before landing! |
Done! |
Implements
::verify
for operations cir.atomic.xchg and cir.atomic.cmp_xchgI believe the existing regression tests don't get to the CIR level type check failure and I was not able to implement a case that does.
Most attempts of reproducing cir.atomic.xchg type check failure were along the lines of:
And they seem to never trigger the failure on
::verify
because they fail earlier in function parameter checking:Closes #1378 .