+ Aarch64: Ldr<Postfix>Mov2Ldr<Postfix> optimization

This commit is contained in:
florian 2021-10-02 16:07:00 +02:00
parent b5c7997c88
commit c1d8e32eae

View File

@ -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;