Parcourir la source

* the MovOpMov2Op optimization needs to take care of the second operand, should resolve #38359

git-svn-id: trunk@49404 -
florian il y a 4 ans
Parent
commit
30df955001
1 fichiers modifiés avec 1 ajouts et 0 suppressions
  1. 1 0
      compiler/x86/aoptx86.pas

+ 1 - 0
compiler/x86/aoptx86.pas

@@ -3023,6 +3023,7 @@ unit aoptx86;
           GetNextInstruction(hp1, hp2) and
           MatchInstruction(hp2,A_MOV,[]) and
           (SuperRegistersEqual(taicpu(hp2).oper[0]^.reg,taicpu(p).oper[1]^.reg)) and
+          (topsize2memsize[taicpu(hp1).opsize]>=topsize2memsize[taicpu(hp2).opsize]) and
           (
             IsFoldableArithOp(taicpu(hp1), taicpu(p).oper[1]^.reg)
 {$ifdef x86_64}