Procházet zdrojové kódy

* RiscV: fix AndiAndi2Andi optimization

florian před 1 rokem
rodič
revize
7c023d33d0
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      compiler/riscv/aoptcpurv.pas

+ 1 - 1
compiler/riscv/aoptcpurv.pas

@@ -385,7 +385,7 @@ implementation
                      (taicpu(hp1).ops=3) and
                      MatchOperand(taicpu(p).oper[0]^,taicpu(hp1).oper[1]^) and
                      (taicpu(hp1).oper[2]^.typ=top_const) and
-                     is_imm12(taicpu(p).oper[2]^.val+taicpu(hp1).oper[2]^.val) and
+                     is_imm12(taicpu(p).oper[2]^.val and taicpu(hp1).oper[2]^.val) and
                      (not RegModifiedBetween(taicpu(p).oper[1]^.reg, p,hp1)) and
                      RegEndOfLife(taicpu(p).oper[0]^.reg, taicpu(hp1)) then
                     begin