소스 검색

* x86-64: Fixed bug where the wrong operand was checked for the "Mov2Nop 8" peephole optimisation (fixes i41367)

J. Gareth "Curious Kit" Moreton 2 주 전
부모
커밋
a6af56cc0d
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      compiler/x86/aoptx86.pas

+ 1 - 1
compiler/x86/aoptx86.pas

@@ -11374,7 +11374,7 @@ unit aoptx86;
 
             DebugMsg(SPeepholeOptimization + 'Made 32-to-64-bit zero extension more efficient (MovlMovq2MovlMovl 1)', hp1);
 
-            if not RegUsedAfterInstruction(taicpu(p).oper[0]^.reg, hp1, TmpUsedRegs) then
+            if not RegUsedAfterInstruction(taicpu(p).oper[1]^.reg, hp1, TmpUsedRegs) then
               begin
                 DebugMsg(SPeepholeOptimization + 'Mov2Nop 8 done', p);
                 RemoveCurrentP(p);