mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-19 21:19:31 +02:00
+ S*LI x,x,0 to nop optimization
This commit is contained in:
parent
c81f10bfbd
commit
1c96bf5d30
@ -474,10 +474,21 @@ implementation
|
||||
end;
|
||||
end;
|
||||
A_SLL,
|
||||
A_SRL,
|
||||
A_SRL:
|
||||
result:=OptPass1OP(p);
|
||||
A_SRLI,
|
||||
A_SLLI:
|
||||
result:=OptPass1OP(p);
|
||||
begin
|
||||
if (taicpu(p).oper[2]^.val=0) and
|
||||
MatchOperand(taicpu(p).oper[0]^,taicpu(p).oper[1]^) then
|
||||
begin
|
||||
DebugMsg('Peephole S*LI x,x,0 to nop performed', p);
|
||||
RemoveInstr(p);
|
||||
result:=true;
|
||||
end
|
||||
else
|
||||
result:=OptPass1OP(p);
|
||||
end;
|
||||
A_SLTI:
|
||||
begin
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user