mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 11:09:42 +02:00
* ARM: fix for Merge Add/Sub optimization
git-svn-id: trunk@49520 -
This commit is contained in:
parent
356afdd25b
commit
bbcc396644
@ -640,6 +640,10 @@ Implementation
|
||||
into
|
||||
|
||||
add/sub rx,ry,const1+/-const
|
||||
or
|
||||
mov rx,ry if const1+/-const=0
|
||||
or
|
||||
remove it, if rx=ry and const1+/-const=0
|
||||
|
||||
check if the first operation has no postfix and condition
|
||||
}
|
||||
@ -664,7 +668,13 @@ Implementation
|
||||
Result:=true;
|
||||
if newvalue=0 then
|
||||
begin
|
||||
RemoveCurrentP(p);
|
||||
if MatchOperand(taicpu(p).oper[0]^,taicpu(p).oper[1]^) then
|
||||
RemoveCurrentP(p)
|
||||
else
|
||||
begin
|
||||
taicpu(p).opcode:=A_MOV;
|
||||
taicpu(p).ops:=2;
|
||||
end;
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user