[AArch64] Properly handle simple arith+extend ops in rtx costs
* config/aarch64/aarch64.c (aarch64_rtx_arith_op_extract_p): Handle simple SIGN_EXTEND or ZERO_EXTEND. (aarch64_rtx_costs): Properly strip extend or extract before passing down to rtx costs again. From-SVN: r226309
This commit is contained in:
parent
4b1cbcee3e
commit
e47c403137
2 changed files with 16 additions and 2 deletions
|
@ -1,3 +1,10 @@
|
|||
2015-07-28 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
|
||||
|
||||
* config/aarch64/aarch64.c (aarch64_rtx_arith_op_extract_p):
|
||||
Handle simple SIGN_EXTEND or ZERO_EXTEND.
|
||||
(aarch64_rtx_costs): Properly strip extend or extract before
|
||||
passing down to rtx costs again.
|
||||
|
||||
2015-07-28 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* config/rl78/rl78.c (rl78_addsi3_internal): New function.
|
||||
|
|
|
@ -5617,6 +5617,11 @@ aarch64_rtx_arith_op_extract_p (rtx x, machine_mode mode)
|
|||
return true;
|
||||
}
|
||||
}
|
||||
/* The simple case <ARITH>, XD, XN, XM, [us]xt.
|
||||
No shift. */
|
||||
else if (GET_CODE (x) == SIGN_EXTEND
|
||||
|| GET_CODE (x) == ZERO_EXTEND)
|
||||
return REG_P (XEXP (x, 0));
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -6128,7 +6133,8 @@ cost_minus:
|
|||
if (speed)
|
||||
*cost += extra_cost->alu.extend_arith;
|
||||
|
||||
*cost += rtx_cost (XEXP (XEXP (op1, 0), 0), VOIDmode,
|
||||
op1 = aarch64_strip_extend (op1);
|
||||
*cost += rtx_cost (op1, VOIDmode,
|
||||
(enum rtx_code) GET_CODE (op1), 0, speed);
|
||||
return true;
|
||||
}
|
||||
|
@ -6206,7 +6212,8 @@ cost_plus:
|
|||
if (speed)
|
||||
*cost += extra_cost->alu.extend_arith;
|
||||
|
||||
*cost += rtx_cost (XEXP (XEXP (op0, 0), 0), VOIDmode,
|
||||
op0 = aarch64_strip_extend (op0);
|
||||
*cost += rtx_cost (op0, VOIDmode,
|
||||
(enum rtx_code) GET_CODE (op0), 0, speed);
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue