mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 07:29:25 +02:00
+ Aarch64: Ldr<Postfix>Mov2Ldr<Postfix> optimization
This commit is contained in:
parent
b5c7997c88
commit
c1d8e32eae
@ -297,11 +297,17 @@ Implementation
|
|||||||
|
|
||||||
|
|
||||||
function TCpuAsmOptimizer.OptPass1LDR(var p: tai): Boolean;
|
function TCpuAsmOptimizer.OptPass1LDR(var p: tai): Boolean;
|
||||||
|
var
|
||||||
|
hp1: tai;
|
||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False;
|
||||||
if inherited OptPass1LDR(p) or
|
if inherited OptPass1LDR(p) or
|
||||||
LookForPostindexedPattern(p) then
|
LookForPostindexedPattern(p) then
|
||||||
Exit(True);
|
Exit(True)
|
||||||
|
else if (taicpu(p).oppostfix in [PF_B,PF_SB,PF_H,PF_SH,PF_None]) and
|
||||||
|
GetNextInstructionUsingReg(p, hp1, taicpu(p).oper[0]^.reg) and
|
||||||
|
RemoveSuperfluousMove(p, hp1, 'Ldr<Postfix>Mov2Ldr<Postfix>') then
|
||||||
|
Exit(true);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user