Uh oh!
There was an error while loading. Please reload this page.
Force new label after IG that ends with align instruction - #62025
Conversation
ghost
commented
Nov 24, 2021
Tagging subscribers to this area: @JulieLeeMSFT Issue DetailsSometimes, we might end up having 2 assert(needLabel || ((block->bbPrev->bbJumpKind == BBJ_ALWAYS) && (block->bbJumpKind == BBJ_ALWAYS))); E97AFFFFFF jmp G_M22669_IG12 E9A0060000 jmp G_M22669_IG78
|
kunalspathak
commented
Nov 29, 2021
@dotnet/jit-contrib @BruceForstall |
BruceForstall
commented
Nov 30, 2021
@kunalspathak Can you explain how we can get back-to-back |
kunalspathak
commented
Nov 30, 2021
That magic happens when we decide to "Conditionally fold" a basic block, but while doing that, do not check if previous block also had an unconditional jump. Initial flow: During conditional folding of jumps, we do this: which transforms the flow to: We also optimize and remove During codegen, we get this: So yes, the second |
Sometimes, we might end up having 2
jmpinstructions as part of same block and we might prefer to addaligninstruction after the 1st jump but then we would assert that there is no label present. I can update the assert condition to something like below, but I think proper fix would be to setneedLabel = truein such cases.Fixes: #61939