Parcourir la source

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

J. Gareth "Curious Kit" Moreton il y a 2 semaines
Parent
commit
a6af56cc0d
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  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);