mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-23 17:49:43 +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
|
||||
memory accesses while sqr(<real>) has no drawback }
|
||||
if is_real(left.resultdef) and is_real(right.resultdef) and
|
||||
left.isequal(right) then
|
||||
if (nodetype=muln) and
|
||||
is_real(left.resultdef) and is_real(right.resultdef) and
|
||||
left.isequal(right) then
|
||||
begin
|
||||
result:=cinlinenode.create(in_sqr_real,false,left);
|
||||
left:=nil;
|
||||
|
Loading…
Reference in New Issue
Block a user