mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 12:49:09 +02:00
* remove the redundant equal typeconv, left over as an artifact after removing
the unnecessary widening of intermediary calculations to 64-bit. This allows, among other things, the x:=x+k optimization to be applied in the case of signed32:=signed32+unsigned32 types. git-svn-id: trunk@36191 -
This commit is contained in:
parent
603d54d0c2
commit
460dd1c10a
@ -3064,6 +3064,14 @@ implementation
|
|||||||
checkremovebiginttypeconvs(left,foundsint,[s8bit,u8bit],int64(low(shortint)),high(byte)) then
|
checkremovebiginttypeconvs(left,foundsint,[s8bit,u8bit],int64(low(shortint)),high(byte)) then
|
||||||
doremoveinttypeconvs(left,generrordef,not foundsint,s8inttype,u8inttype);
|
doremoveinttypeconvs(left,generrordef,not foundsint,s8inttype,u8inttype);
|
||||||
{$endif defined(cpu8bitalu)}
|
{$endif defined(cpu8bitalu)}
|
||||||
|
{ the above simplification may have left a redundant equal
|
||||||
|
typeconv (e.g. int32 to int32). If that's the case, we remove it }
|
||||||
|
if equal_defs(left.resultdef,resultdef) then
|
||||||
|
begin
|
||||||
|
result:=left;
|
||||||
|
left:=nil;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user