* get rid of unneeded 64 bit multiplications, it makes also for signed operations no difference if a calculation is carried out with 32 or 64 bit, if the result is casted to 32 bin again

git-svn-id: trunk@25868 -
This commit is contained in:
florian 2013-10-27 16:47:37 +00:00
parent 0eeb3e8d49
commit 17dcd2fa31

View File

@ -2449,7 +2449,7 @@ implementation
{ 8/16/32 bit value afterwards }
function checkremove64bittypeconvs(n: tnode; out gotsint: boolean): boolean;
var
gotmuldivmod: boolean;
gotdivmod: boolean;
{ checks whether a node is either an u32bit, or originally }
{ was one but was implicitly converted to s64bit }
@ -2510,8 +2510,8 @@ implementation
end;
addn,muln,divn,modn,andn:
begin
if n.nodetype in [muln,divn,modn] then
gotmuldivmod:=true;
if n.nodetype in [divn,modn] then
gotdivmod:=true;
result:=
docheckremove64bittypeconvs(tbinarynode(n).left) and
docheckremove64bittypeconvs(tbinarynode(n).right);
@ -2520,11 +2520,11 @@ implementation
end;
begin { checkremove64bittypeconvs }
gotmuldivmod:=false;
gotdivmod:=false;
gotsint:=false;
result:=
docheckremove64bittypeconvs(n) and
not(gotmuldivmod and gotsint);
not(gotdivmod and gotsint);
end;