Repository navigation
JIT: fix loop alignment issue - #70936
Conversation
When scanning to figure out which blocks should have alignment padding, we can sometimes encounter a block in a loop before we see the block at the top of the loop.. If so, remove alignment for that loop, otherwise the emitter code handling alignment gets tripped up. Even if the emitter could handle this case, it would be padding with the loop, not before it. The problematic block reordering is done much earlier. At some point we need to revisit this as it is making nonsensical ordering decisions. But we'll tolerate it for now. Fixes dotnet#70152.
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue DetailsWhen scanning to figure out which blocks should have alignment padding, we can The problematic block reordering is done much earlier. At some point we need to Fixes #70152.
|
|
@kunalspathak PTAL No diffs expected (test case came from pgo stress). |
|
Do you mind sharing the problematic JITDUMP, just that I can see with an example? |
It is too big to share via gist. I'll send it to you privately. |
Thanks, I see the problem that this PR will fix. |
|
Should have mentioned that there was similar info over on the issue. But yeah, the loop blocks are out of order. |
When scanning to figure out which blocks should have alignment padding, we can
sometimes encounter a block in a loop before we see the block at the top of the
loop.. If so, remove alignment for that loop, otherwise the emitter code
handling alignment gets tripped up. Even if the emitter could handle this case,
it would be padding with the loop, not before it.
The problematic block reordering is done much earlier. At some point we need to
revisit this as it is making nonsensical ordering decisions. But we'll tolerate
it for now.
Fixes #70152.