mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 19:49:09 +02:00
+ optimize OP_XOR by 0 to OP_NONE in optimize_op_const
git-svn-id: trunk@35936 -
This commit is contained in:
parent
50b1c9c088
commit
9a1812dfd9
@ -1505,6 +1505,12 @@ implementation
|
|||||||
if a=0 then
|
if a=0 then
|
||||||
op:=OP_MOVE;
|
op:=OP_MOVE;
|
||||||
end;
|
end;
|
||||||
|
OP_XOR :
|
||||||
|
begin
|
||||||
|
{ xor with zero returns same result }
|
||||||
|
if a = 0 then
|
||||||
|
op:=OP_NONE;
|
||||||
|
end;
|
||||||
OP_DIV :
|
OP_DIV :
|
||||||
begin
|
begin
|
||||||
{ division by 1 returns result }
|
{ division by 1 returns result }
|
||||||
|
Loading…
Reference in New Issue
Block a user