-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix insertion of alignment after BBJ_CALLFINALLY/BBJ_ALWAYS #76988
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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