mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 02:49:21 +02:00
+ MovzMovz2Movz optimization
This commit is contained in:
parent
a93942cd27
commit
5a60eac0c8
@ -610,6 +610,21 @@ Implementation
|
|||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
{
|
||||||
|
remove the second Movz from
|
||||||
|
|
||||||
|
movz reg,...
|
||||||
|
movz reg,...
|
||||||
|
}
|
||||||
|
if GetNextInstructionUsingReg(p,hp1,taicpu(p).oper[0]^.reg) and
|
||||||
|
MatchInstruction(hp1,A_MOVZ,[C_None],[PF_none]) and
|
||||||
|
MatchOperand(taicpu(p).oper[0]^,taicpu(hp1).oper[0]^) then
|
||||||
|
begin
|
||||||
|
DebugMsg(SPeepholeOptimization + 'MovzMovz2Movz', p);
|
||||||
|
RemoveCurrentP(p);
|
||||||
|
Result:=true;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user