* x86: Bug fix in OptPass1MOV long-range optimisations where

the wrong register was checked to see if had changed.
This commit is contained in:
J. Gareth "Curious Kit" Moreton 2024-04-19 23:51:54 +01:00 committed by FPK
parent ab9c499650
commit d5c6286852

View File

@ -4622,7 +4622,7 @@ unit aoptx86;
(taicpu(p).oper[0]^.typ = top_reg) and
MatchOpType(taicpu(hp2), top_reg, top_reg) and
SuperRegistersEqual(p_TargetReg, taicpu(hp2).oper[0]^.reg) and
not RegModifiedBetween(p_TargetReg, p, hp2) then
not RegModifiedBetween(taicpu(p).oper[0]^.reg, p, hp2) then
begin
TempRegUsed :=
CrossJump { Assume the register is in use if it crossed a conditional jump } or