[JIT] - Fixed sub-optimal optimization for a % 1 to Zero#77760
[JIT] - Fixed sub-optimal optimization for a % 1 to Zero#77760TIHan merged 25 commits intodotnet:mainfrom
a % 1 to Zero#77760Conversation
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue Details** Description ** Should resolve: #10956 Simple optimization. Will transform ** Acceptance Criteria **
|
|
Note there is already an optimization that does this: runtime/src/coreclr/jit/morph.cpp Lines 9872 to 9887 in bdd67af |
|
Good catch. Will probably remove it in favor of this since it expands it. |
a % 1 to Zero
|
@dotnet/jit-contrib This is ready. |
|
/azp run Fuzzlyn |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
The failures look related |
a % 1 to Zeroa % 1 and a % -1 to Zero
|
@dotnet/jit-contrib @jakobbotsch This is ready again. |
a % 1 and a % -1 to Zeroa % 1 to Zero
|
@dotnet/jit-contrib @EgorBo This is ready for review again. We update the value number for the zero node, and we disable the optimization if we are not in global morph when there are side effects. |
|
@dotnet/jit-contrib ready again |
|
@dotnet/jit-contrib @jakobbotsch @EgorBo This is ready again too. Fixed a minor issue when setting the integral value for |
src/tests/JIT/opt/Remainder/Regressions/Regression1/Regression1.csproj
Outdated
Show resolved
Hide resolved
…l not happen if optimizations are disabled
|
@dotnet/jit-contrib This is ready for another round of review, based on our internal discussion yesterday. |
| <CLRTestEnvironmentVariable Include="DOTNET_TieredCompilation" Value="0" /> | ||
| <CLRTestEnvironmentVariable Include="DOTNET_JITMinOpts" Value="0" /> |
There was a problem hiding this comment.
One thing I don't remember:
If we have <HasDisasmCheck>true<...>, why do we need to clear TieredCompilation/JITMinOpts? Shouldn't the "HasDisasmCheck" logic do that for us?
There was a problem hiding this comment.
<HasDisasmCheck>true<...> does not force any environment variables that affect codegen - so it is up to the test itself to decide them.
Description
Should resolve: #10956
We already did the transformation of
a % 1, but we ignored it ifop1had any side effects. This PR should fix that.X64 Diff:

Acceptance Criteria