The ARC's 600 multiplication instruction can accept signed 12 bit
instructions.

gcc/
xxxx-xx-xx  Claudiu Zissulescu  <claz...@synopsys.com>

        * config/arc/arc.c (arc_rtx_costs): Update mul64 cost.
---
 gcc/config/arc/arc.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c
index fc174361b02..1800687ef12 100644
--- a/gcc/config/arc/arc.c
+++ b/gcc/config/arc/arc.c
@@ -5887,6 +5887,12 @@ arc_rtx_costs (rtx x, machine_mode mode, int outer_code,
                  nolimm = true;
                if (satisfies_constraint_Clo (x))
                  nolimm = true;
+               break;
+             case MULT:
+               if (TARGET_MUL64_SET)
+                 if (SIGNED_INT12 (INTVAL (x)))
+                   nolimm = true;
+               break;
              default:
                break;
              }
-- 
2.24.1

Reply via email to