JIT: fix local assertion prop error for partial local comparisons#112506
JIT: fix local assertion prop error for partial local comparisons#112506AndyAyersMS merged 2 commits intodotnet:mainfrom
Conversation
If a JTRUE comparison only involves part of a local value we cannot make assertions about the local as a whole. Fixes dotnet#111352.
There was a problem hiding this comment.
Copilot reviewed 1 out of 3 changed files in this pull request and generated no comments.
Files not reviewed (2)
- src/coreclr/jit/assertionprop.cpp: Language not supported
- src/tests/JIT/Regression/JitBlue/Runtime_111352/Runtime_111352.csproj: Language not supported
|
@EgorBo PTAL Surprising (though small) number of diffs though many of those look like bool cases where the bits we don't compare happen to be zero, so we were getting lucky. This only affects local AP an only in the (relatively new) cross-block mode introduced in #94741. This was reported as a .NET 9 issue so I will propose a backport. |
Can you share some of those cases? I think it should be ok to scope the check here to |
|
here is one of the simpler ones |
|
The base there looks ok to me. V04 is normalize-on-store, so its upper 24 bits are always going to be zero |
|
So you think just the TYP_LONG locals are at risk? |
|
Seems plausible because this sort of pattern must be rare or we'd have found this long ago. |
I think so, yes. We allow accessing lower 32 bits of |
|
Ok, did that. Now no diffs locally. |
|
/backport to release/9.0 |
|
Started backporting to release/9.0: https://github.com/dotnet/runtime/actions/runs/13317332242 |
|
/backport to release/9.0-staging |
|
Started backporting to release/9.0-staging: https://github.com/dotnet/runtime/actions/runs/13318074756 |
If a JTRUE comparison only involves part of a local value we cannot make assertions about the local as a whole.
Fixes #111352.