2
0
Эх сурвалжийг харах

* check whether both left and right are reals rather than twice whether left
is real before transforming a multiply into an sqr operation (fixes make
cycle after r18252, don't know where or even how it caused a wrong
optimization)

git-svn-id: trunk@18257 -

Jonas Maebe 14 жил өмнө
parent
commit
b5fc32750b
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  1. 1 1
      compiler/nadd.pas

+ 1 - 1
compiler/nadd.pas

@@ -782,7 +782,7 @@ 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(left.resultdef) and
+            if is_real(left.resultdef) and is_real(right.resultdef) and
               left.isequal(right) then
               begin
                 result:=cinlinenode.create(in_sqr_real,false,left);