Browse Source

* more div n^2 optimization

git-svn-id: trunk@8867 -
florian 18 years ago
parent
commit
c77267e01f
1 changed files with 4 additions and 1 deletions
  1. 4 1
      compiler/arm/narmmat.pas

+ 4 - 1
compiler/arm/narmmat.pas

@@ -66,7 +66,10 @@ implementation
       begin
         if (right.nodetype=ordconstn) and
           (nodetype=divn) and
-          ispowerof2(tordconstnode(right).value,power) and
+          (ispowerof2(tordconstnode(right).value,power) or
+           (tordconstnode(right).value=1) or
+           (tordconstnode(right).value=-1)
+          ) and
           not(is_64bitint(resultdef)) then
           result:=nil
         else