diff mbox series

[4/4,ARC] Update ARC600 multiplication cost.

Message ID 20200122081452.4710-4-claziss@gmail.com
State New
Headers show
Series [1/4,ARC] Make libgcc compatible with ARC's reduced register set config. | expand

Commit Message

Claudiu Zissulescu Ianculescu Jan. 22, 2020, 8:14 a.m. UTC
The ARC's 600 multiplication instruction can accept signed 12 bit
instructions.

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

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

Comments

Jeff Law Jan. 22, 2020, 8:16 p.m. UTC | #1
On Wed, 2020-01-22 at 10:14 +0200, Claudiu Zissulescu wrote:
> The ARC's 600 multiplication instruction can accept signed 12 bit
> instructions.
> 
> gcc/
> xxxx-xx-xx  Claudiu Zissulescu  <claziss@synopsys.com>
> 
> 	* config/arc/arc.c (arc_rtx_costs): Update mul64 cost.
OK
jeff
>
diff mbox series

Patch

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;
 	      }