-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add codegen tests for identity matching results #100692
Conversation
Doh, we raced on this -- I opened #100693 two minutes after you did this one 😆 |
Aaah! :D Well, let's keep your PR, you know much more about this. At least I learned how to write a codegen test :) |
Looks like you did a pretty good job! Always good to have more people who can help out with pinning or The two review notes I'd have to help you in future:
|
The job Click to see the possible cause of the failure (guessed by this bot)
|
Ah, thank you, PR build, for running with LLVM 13 and conveniently illustrating my point 🙃 |
Oh, that's really interesting! Since Can you file an issue about it? Definitely seems weird enough to be worth one, at least. (Though it's nice that it's still a nop, just a two-register nop instead of a one-register nop.) |
Thanks a lot for the hints! I filed #100698. |
This is an attempt to write codegen tests to ensure that returning an identity of a
Result
does not have unnecessary overhead (#37939).This is my first codegen test, so take it easy on me.
Btw, I noticed that for
Result<u32, u32>
it generates less optimal code (https://rust.godbolt.org/z/YEcjTboYK). Seems like some aggregate ABI issue.r? @scottmcm