mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-24 03:59:12 +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;
|
||||
var
|
||||
hp1: tai;
|
||||
begin
|
||||
Result := False;
|
||||
if inherited OptPass1LDR(p) or
|
||||
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;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user