-
Notifications
You must be signed in to change notification settings - Fork 5.3k
RyuJIT: Optimize "x<0" to "x>>31" #35627
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
|
Since .NET uses |
|
@dotnet/jit-contrib |
|
New jit-diff (there are no regressions): |
|
@CarolEidt should be better now: x86 support is checked, |
CarolEidt
left a comment
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 - thanks @EgorBo !
|
I suspect this change has broken such CMP in minopts: the generated code is: This was found during library stress runs: #42719 I have attached a minimal repo @EgorBo could you please take a look? |
|
Sure! I'm taking a look now. |
I am not a codegen expert and just trying to learn this stuff through mistakes and your feedback. I wonder if this is a correct way to optimize
y=x<0toy=x>>31(whenyis not a jump condition - in that casetestis used)Before
After
jit-diff (-f -pmi)