mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-09 17:06:04 +02:00
* only transform multiplication nodes to sqr, not any kind of addnode
(fix for 18252) git-svn-id: trunk@18263 -
This commit is contained in:
parent
3abfec476a
commit
8c7f1e1013
@ -782,8 +782,9 @@ implementation
|
|||||||
|
|
||||||
{ using sqr(x) for reals instead of x*x might reduces register pressure and/or
|
{ using sqr(x) for reals instead of x*x might reduces register pressure and/or
|
||||||
memory accesses while sqr(<real>) has no drawback }
|
memory accesses while sqr(<real>) has no drawback }
|
||||||
if is_real(left.resultdef) and is_real(right.resultdef) and
|
if (nodetype=muln) and
|
||||||
left.isequal(right) then
|
is_real(left.resultdef) and is_real(right.resultdef) and
|
||||||
|
left.isequal(right) then
|
||||||
begin
|
begin
|
||||||
result:=cinlinenode.create(in_sqr_real,false,left);
|
result:=cinlinenode.create(in_sqr_real,false,left);
|
||||||
left:=nil;
|
left:=nil;
|
||||||
|
Loading…
Reference in New Issue
Block a user