@@ -4632,7 +4632,6 @@ void emitter::emitRemoveJumpToNextInst()
46324632#if DEBUG
46334633 assert (jmp->idInsFmt () == IF_LABEL);
46344634 assert (emitIsUncondJump (jmp));
4635- assert ((jmpGroup->igFlags & IGF_HAS_ALIGN) == 0 );
46364635 assert ((jmpGroup->igNum > previousJumpIgNum) || (previousJumpIgNum == (UNATIVE_OFFSET)-1 ) ||
46374636 ((jmpGroup->igNum == previousJumpIgNum) && (jmp->idDebugOnlyInfo ()->idNum > previousJumpInsNum)));
46384637 previousJumpIgNum = jmpGroup->igNum ;
@@ -4646,6 +4645,8 @@ void emitter::emitRemoveJumpToNextInst()
46464645
46474646 if ((jmpGroup->igNext == targetGroup) && ((jmpGroup->igFlags & IGF_HAS_REMOVABLE_JMP) != 0 ))
46484647 {
4648+ assert (!jmpGroup->endsWithAlignInstr ());
4649+
46494650 // the last instruction in the group is the jmp we're looking for
46504651 // and it jumps to the next instruction group so we don't need it
46514652 CLANG_FORMAT_COMMENT_ANCHOR
@@ -4736,11 +4737,6 @@ void emitter::emitRemoveJumpToNextInst()
47364737 JITDUMP (" IG%02u IN%04x jump target is not set!, keeping.\n " , jmpGroup->igNum ,
47374738 jmp->idDebugOnlyInfo ()->idNum );
47384739 }
4739- else if ((jmpGroup->igFlags & IGF_HAS_ALIGN) != 0 )
4740- {
4741- JITDUMP (" IG%02u IN%04x containing instruction group has alignment, keeping.\n " , jmpGroup->igNum ,
4742- jmp->idDebugOnlyInfo ()->idNum );
4743- }
47444740 else if (jmpGroup->igNext != targetGroup)
47454741 {
47464742 JITDUMP (" IG%02u IN%04x does not jump to the next instruction group, keeping.\n " , jmpGroup->igNum ,
@@ -4752,6 +4748,11 @@ void emitter::emitRemoveJumpToNextInst()
47524748 " keeping.\n " ,
47534749 jmpGroup->igNum , jmp->idDebugOnlyInfo ()->idNum );
47544750 }
4751+ else if (jmpGroup->endsWithAlignInstr ())
4752+ {
4753+ JITDUMP (" IG%02u IN%04x containing instruction group has alignment, keeping.\n " , jmpGroup->igNum ,
4754+ jmp->idDebugOnlyInfo ()->idNum );
4755+ }
47554756#endif // DEBUG
47564757 }
47574758 }
0 commit comments