瀏覽代碼

* Addi0Op2Op has to consider both operands

florian 1 年之前
父節點
當前提交
584e49c6a2
共有 1 個文件被更改,包括 3 次插入5 次删除
  1. 3 5
      compiler/riscv/aoptcpurv.pas

+ 3 - 5
compiler/riscv/aoptcpurv.pas

@@ -339,11 +339,9 @@ implementation
          RegEndOfLife(taicpu(p).oper[0]^.reg, taicpu(hp1)) then
         begin
           if MatchOperand(taicpu(p).oper[0]^,taicpu(hp1).oper[2]^) then
-            taicpu(hp1).loadreg(2,taicpu(p).oper[1]^.reg)
-          else if MatchOperand(taicpu(p).oper[0]^,taicpu(hp1).oper[1]^) then
-            taicpu(hp1).loadreg(1,taicpu(p).oper[1]^.reg)
-          else
-            Internalerror(2024093001);
+            taicpu(hp1).loadreg(2,taicpu(p).oper[1]^.reg);
+          if MatchOperand(taicpu(p).oper[0]^,taicpu(hp1).oper[1]^) then
+            taicpu(hp1).loadreg(1,taicpu(p).oper[1]^.reg);
 
           DebugMsg('Peephole Addi0Op2Op performed', hp1);