-
Notifications
You must be signed in to change notification settings - Fork 13.4k
[LangRef][IR] Add 3-way compare intrinsics llvm.scmp/llvm.ucmp #83227
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
Conversation
WOW, format on save really screwed up my day here. I'll fix it tomorrow and learn about tablegen. Sorry for the noise. |
e4ed0df
to
88593fa
Compare
Please split this PR into separate ones. |
@dtcxzyw gladly! I think it makes sense to split it after completing Stage 2 and landing support in SelectionDAG for the |
I'd recommend making the first patch the change to LangRef, Intrinsics.td and (if necessary) the IR Verifier only, and then follow up with the actual SDAG implementation later. This is the critical-path change that everything else depends on, and LangRef changes tend to involve a lot of bikeshedding. |
That seems very reasonable then. Thanks! |
88593fa
to
34c0531
Compare
@nikic Alright, first proper draft is up. Areas for improvement:
|
For reference, a GlobalIsel PR that introduced new named opcodes and touched the IRTranslator. |
✅ With the latest revision this PR passed the C/C++ code formatter. |
@dc03-work , oh, that I'll try to add it as a prehook commit hook eventually, thanks for pointing that out! |
@nikic if we're fine with adding/correcting the unit tests failing for now, 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.
LGTM
@nikic fwiw Linux builders have passed but we're still waiting on a windows builder -_- |
ping for @scottmcm, @dc03-work, @topperc, and @RKSimon for review in case the other notifications drowned it out. |
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.
LGTM with a couple minor nits.
Thanks for the ping! I'm just the peanut gallery here; I'm no gate at all. Looks reasonable, though. |
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.
LGTM
…83227) This PR adds the `[us]cmp` intrinsics to the LangRef, `Intrinsics.td` and some tests to the IRVerifier. RFC: https://discourse.llvm.org/t/rfc-add-3-way-comparison-intrinsics/76685
This PR adds the
[us]cmp
intrinsics to the LangRef,Intrinsics.td
and some tests to the IRVerifier.RFC: https://discourse.llvm.org/t/rfc-add-3-way-comparison-intrinsics/76685