Fix insertion of alignment after BBJ_CALLFINALLY/BBJ_ALWAYS#76988
Fix insertion of alignment after BBJ_CALLFINALLY/BBJ_ALWAYS#76988BruceForstall merged 1 commit intodotnet:mainfrom
Conversation
The Runtime_76346 test exposed a case where, in the case of STRESS_EMITTER, we were inserting breakpoint instructions instead of NOPs for loop alignment when the alignment followed an unconditional branch. However, it wasn't considering the case of a BBJ_CALLFINALLY/BBJ_ALWAYS pair immediately followed by a loop head. This pointed out that alignment instructions should never be inserted in that BBJ_ALWAYS block, since that block shouldn't contain any code. Inserting the alignment NOPs affected the reported range of the EH cloned finally region in the FEATURE_EH_CALLFINALLY_THUNKS case. In these special cases, we simply give up on trying to align the loop. Fixes dotnet#76910
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue DetailsThe Runtime_76346 test exposed a case where, in the case of STRESS_EMITTER, we were inserting breakpoint instructions instead of NOPs for loop alignment when the alignment followed an unconditional branch. However, it wasn't considering the case of a BBJ_CALLFINALLY/BBJ_ALWAYS pair immediately followed by a loop head. This pointed out that alignment instructions should never be inserted in that BBJ_ALWAYS block, since that block shouldn't contain any code. Inserting the alignment NOPs affected the reported range of the EH cloned finally region in the FEATURE_EH_CALLFINALLY_THUNKS case. In these special cases, we simply give up on trying to align the loop. Fixes #76910
|
|
Failure is known infra issue. |
|
@kunalspathak @dotnet/jit-contrib PTAL |
kunalspathak
left a comment
There was a problem hiding this comment.
Its odd that this failure just showed up now.
It's obviously quite rare in practice, as it requires (1) a try/finally immediately before a loop, (2) the 'finally' doesn't get optimized by finally cloning, (3) the loop header immediately follows, meaning we haven't done loop inversion. |
The Runtime_76346 test exposed a case where, in the case of STRESS_EMITTER, we were inserting breakpoint instructions instead of NOPs for loop alignment when the alignment followed an unconditional branch. However, it wasn't considering the case of a BBJ_CALLFINALLY/BBJ_ALWAYS pair immediately followed by a loop head.
This pointed out that alignment instructions should never be inserted in that BBJ_ALWAYS block, since that block shouldn't contain any code. Inserting the alignment NOPs affected the reported range of the EH cloned finally region in the FEATURE_EH_CALLFINALLY_THUNKS case.
In these special cases, we simply give up on trying to align the loop.
Fixes #76910
No diffs