瀏覽代碼

* Fixed lack of the calculation code for the strength reduction optimization.

Yuriy Sydorov 3 年之前
父節點
當前提交
abe3002b5b
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      compiler/optloop.pas

+ 1 - 1
compiler/optloop.pas

@@ -512,9 +512,9 @@ unit optloop;
 
             loopcode:=internalstatements(loopcodestatements);
             addstatement(loopcodestatements,tfornode(node).t2);
+            addstatement(loopcodestatements,calccode);
             tfornode(node).t2:=loopcode;
             do_firstpass(node);
-            addstatement(loopcodestatements,calccode);
 
             result:=internalstatements(newcodestatements);
             addstatement(newcodestatements,initcode);