Explorar o código

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

J. Gareth "Curious Kit" Moreton hai 2 semanas
pai
achega
a6af56cc0d
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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);