JIT: fix loop alignment issue (#70936)
authorAndy Ayers <andya@microsoft.com>
Tue, 21 Jun 2022 15:43:48 +0000 (08:43 -0700)
committerGitHub <noreply@github.com>
Tue, 21 Jun 2022 15:43:48 +0000 (08:43 -0700)
commit95138ddef6e5624562beeaa8bcb9ae89daf17e44
treee5730e5743249a3324761ca8f6598e86e5574eac
parent786ec9df806ca6348c53579041c93067975bf940
JIT: fix loop alignment issue (#70936)

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.
src/coreclr/jit/compiler.cpp