* 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:
nickysn 2017-05-12 11:40:06 +00:00
parent 603d54d0c2
commit 460dd1c10a

View File

@ -3064,6 +3064,14 @@ implementation
checkremovebiginttypeconvs(left,foundsint,[s8bit,u8bit],int64(low(shortint)),high(byte)) then
doremoveinttypeconvs(left,generrordef,not foundsint,s8inttype,u8inttype);
{$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;