mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 17:09:09 +02:00
* mov x, %treg; mov %treg, y might be only optimized if y does not use treg
git-svn-id: trunk@22015 -
This commit is contained in:
parent
3c1b82f9a0
commit
df01717c38
@ -991,7 +991,8 @@ begin
|
|||||||
(taicpu(hp1).oper[0]^.reg = taicpu(p).oper[1]^.reg) then
|
(taicpu(hp1).oper[0]^.reg = taicpu(p).oper[1]^.reg) then
|
||||||
begin
|
begin
|
||||||
{we have "mov x, %treg; mov %treg, y}
|
{we have "mov x, %treg; mov %treg, y}
|
||||||
if not(RegUsedAfterInstruction(taicpu(p).oper[1]^.reg, hp1, TmpUsedRegs)) then
|
if not(RegInOp(getsupreg(taicpu(p).oper[1]^.reg),taicpu(hp1).oper[1]^)) and
|
||||||
|
not(RegUsedAfterInstruction(taicpu(p).oper[1]^.reg, hp1, TmpUsedRegs)) then
|
||||||
{we've got "mov x, %treg; mov %treg, y; with %treg is not used after }
|
{we've got "mov x, %treg; mov %treg, y; with %treg is not used after }
|
||||||
case taicpu(p).oper[0]^.typ Of
|
case taicpu(p).oper[0]^.typ Of
|
||||||
top_reg:
|
top_reg:
|
||||||
|
Loading…
Reference in New Issue
Block a user