Skip to content

[RyuJIT] Don't optimize "x < 0" to shift for unsigned cmp#45243

Merged
sandreenko merged 5 commits into
dotnet:masterfrom
EgorBo:fix-sign-cmp-opt
Dec 28, 2020
Merged

[RyuJIT] Don't optimize "x < 0" to shift for unsigned cmp#45243
sandreenko merged 5 commits into
dotnet:masterfrom
EgorBo:fix-sign-cmp-opt

Conversation

@EgorBo

@EgorBo EgorBo commented Nov 25, 2020

Copy link
Copy Markdown
Member

Fixes #42719 (see #35627 (comment))

It used to optimize (-1 u< 0) to (-1 >> 31)

/cc @sandreenko

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Nov 25, 2020

@sandreenko sandreenko left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread src/coreclr/src/jit/codegenxarch.cpp Outdated
@sandreenko

Copy link
Copy Markdown
Contributor

PTAL @CarolEidt cc @dotnet/jit-contrib

@sandreenko

Copy link
Copy Markdown
Contributor

LGTM with this and a stress library run

Could you please mark it as fixing #35627 and remove the exclusion for the test at https://github.com/sandreenko/runtime/blob/8c7ecdb1fc5d4ccb6ac667d53255373ae32362b8/src/libraries/Microsoft.CSharp/tests/IntegerBinaryOperationTests.cs#L501?

@ViktorHofer

Copy link
Copy Markdown
Member

// Auto-generated message

69e114c which was merged 12/7 removed the intermediate src/coreclr/src/ folder. This PR needs to be updated as it touches files in that directory which causes conflicts.

To update your commits you can use this bash script: https://gist.github.com/ViktorHofer/6d24f62abdcddb518b4966ead5ef3783. Feel free to use the comment section of the gist to improve the script for others.

@EgorBo

EgorBo commented Dec 15, 2020

Copy link
Copy Markdown
Member Author

@dotnet/jit-contrib can this be merged?

@sandreenko sandreenko merged commit f56ef95 into dotnet:master Dec 28, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Jan 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Projects

None yet

6 participants