diff --git a/compiler/aoptobj.pas b/compiler/aoptobj.pas index 2196bd0a4d..e40ea99441 100644 --- a/compiler/aoptobj.pas +++ b/compiler/aoptobj.pas @@ -1551,7 +1551,7 @@ Unit AoptObj; and (hp1.typ <> ait_jcatch) {$endif} do - if not(hp1.typ in ([ait_label,ait_align]+skipinstr)) then + if not(hp1.typ in ([ait_label]+skipinstr)) then begin if (hp1.typ = ait_instruction) and taicpu(hp1).is_jmp and @@ -1560,7 +1560,7 @@ Unit AoptObj; TAsmLabel(JumpTargetOp(taicpu(hp1))^.ref^.symbol).decrefs; { don't kill start/end of assembler block, no-line-info-start/end etc } - if hp1.typ<>ait_marker then + if not(hp1.typ in [ait_align,ait_marker]) then begin {$ifdef cpudelayslot} if (hp1.typ=ait_instruction) and (taicpu(hp1).is_jmp) then diff --git a/compiler/i386/aoptcpu.pas b/compiler/i386/aoptcpu.pas index 83c88640a4..a255c91790 100644 --- a/compiler/i386/aoptcpu.pas +++ b/compiler/i386/aoptcpu.pas @@ -524,18 +524,18 @@ begin { Handle Jmp Optimizations } if taicpu(p).is_jmp then begin - {the following if-block removes all code between a jmp and the next label, - because it can never be executed} + { the following if-block removes all code between a jmp and the next label, + because it can never be executed } if (taicpu(p).opcode = A_JMP) then begin hp2:=p; while GetNextInstruction(hp2, hp1) and (hp1.typ <> ait_label) do - if not(hp1.typ in ([ait_label,ait_align]+skipinstr)) then + if not(hp1.typ in ([ait_label]+skipinstr)) then begin { don't kill start/end of assembler block, no-line-info-start/end etc } - if hp1.typ<>ait_marker then + if not(hp1.typ in [ait_align,ait_marker]) then begin asml.remove(hp1); hp1.free;