diff options
author | Kyrylo Tkachov <kyrylo.tkachov@arm.com> | 2015-05-22 12:51:34 +0000 |
---|---|---|
committer | Kyrylo Tkachov <ktkachov@gcc.gnu.org> | 2015-05-22 12:51:34 +0000 |
commit | 64a40a7bb33b55a2c0503ef93908dc33896f37d0 (patch) | |
tree | 883b209962e26a8e15ad7e3ba443c92811764197 /gcc/config/arm | |
parent | 57d22af251655cc429d5dec2f6234f33a3c2d8c9 (diff) | |
download | gcc-64a40a7bb33b55a2c0503ef93908dc33896f37d0.zip gcc-64a40a7bb33b55a2c0503ef93908dc33896f37d0.tar.gz gcc-64a40a7bb33b55a2c0503ef93908dc33896f37d0.tar.bz2 |
[ARM] Handle UNSPEC_VOLATILE in rtx costs and don't recurse inside the unspec
* config/arm/arm.c (arm_new_rtx_costs): Handle UNSPEC_VOLATILE.
(arm_unspec_cost): Allow UNSPEC_VOLATILE. Do not recurse inside
unknown unspecs.
From-SVN: r223558
Diffstat (limited to 'gcc/config/arm')
-rw-r--r-- | gcc/config/arm/arm.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 6d8d060..fa95431 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -9253,7 +9253,8 @@ static bool arm_unspec_cost (rtx x, enum rtx_code /* outer_code */, bool speed_p, int *cost) { const struct cpu_cost_table *extra_cost = current_tune->insn_extra_cost; - gcc_assert (GET_CODE (x) == UNSPEC); + rtx_code code = GET_CODE (x); + gcc_assert (code == UNSPEC || code == UNSPEC_VOLATILE); switch (XINT (x, 1)) { @@ -9299,7 +9300,7 @@ arm_unspec_cost (rtx x, enum rtx_code /* outer_code */, bool speed_p, int *cost) *cost = COSTS_N_INSNS (2); break; } - return false; + return true; } /* Cost of a libcall. We assume one insn per argument, an amount for the @@ -10855,6 +10856,7 @@ arm_new_rtx_costs (rtx x, enum rtx_code code, enum rtx_code outer_code, *cost = LIBCALL_COST (1); return false; + case UNSPEC_VOLATILE: case UNSPEC: return arm_unspec_cost (x, outer_code, speed_p, cost); |