Skip to content

Commit e789614

Browse files
Claudiu Zissulescuartemiy-volkov
authored andcommitted
arc64: type fix naming
1 parent 702fe73 commit e789614

File tree

1 file changed

+22
-3
lines changed

1 file changed

+22
-3
lines changed

gcc/config/arc64/arc64.c

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3348,10 +3348,22 @@ arc64_address_cost (rtx addr, machine_mode mode,
33483348
/* The cheapest construct are the addresses which fit a store
33493349
instruction (or a fp load/store instruction). */
33503350
if (arc64_legitimate_address_1_p (mode, addr, true, false, true))
3351-
return 0;
3351+
switch (GET_CODE (addr))
3352+
{
3353+
case PRE_DEC:
3354+
case PRE_INC:
3355+
case POST_DEC:
3356+
case POST_INC:
3357+
case PRE_MODIFY:
3358+
case POST_MODIFY:
3359+
return 0;
3360+
3361+
default:
3362+
return 1;
3363+
}
33523364

33533365
/* Anything else has a limm. */
3354-
return cost_limm + 1;
3366+
return cost_limm + 2;
33553367
}
33563368

33573369
/* Compute the rtx cost. */
@@ -3376,7 +3388,7 @@ arc64_rtx_costs (rtx x, machine_mode mode, rtx_code outer,
33763388
{
33773389
case MEM:
33783390
/* Store instruction. */
3379-
*cost += arc64_address_cost (XEXP (op0, 0), mode, 0, speed);
3391+
*cost += arc64_address_cost (XEXP (op0, 0), mode, 0, speed));
33803392
if (CONST_INT_P (op1))
33813393
{
33823394
*cost += speed ? 0 :
@@ -3464,6 +3476,7 @@ arc64_rtx_costs (rtx x, machine_mode mode, rtx_code outer,
34643476
*cost = rtx_cost (op0, VOIDmode, SIGN_EXTEND, 0, speed);
34653477
return true;
34663478
}
3479+
*cost += COSTS_N_INSNS (2);
34673480
break;
34683481

34693482
case CONST_INT:
@@ -3495,11 +3508,17 @@ arc64_rtx_costs (rtx x, machine_mode mode, rtx_code outer,
34953508
case ASHIFT:
34963509
case ASHIFTRT:
34973510
case LSHIFTRT:
3511+
return true;
3512+
34983513
case MULT:
3514+
/* Multiplication has large latencys, try if we can use adds and
3515+
shifts. */
3516+
*cost = COSTS_N_INSNS (2);
34993517
return true;
35003518

35013519
case DIV:
35023520
case UDIV:
3521+
/* Fav synthetic divs. */
35033522
*cost = COSTS_N_INSNS (12);
35043523
return true;
35053524

0 commit comments

Comments
 (0)