+2015-05-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * config/arm/arm.c (arm_new_rtx_costs): Handle UNSPEC_VOLATILE.
+ (arm_unspec_cost): Allow UNSPEC_VOLATILE. Do not recurse inside
+ unknown unspecs.
+
2015-05-22 Richard Biener <rguenther@suse.de>
PR tree-optimization/66251
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))
{
*cost = COSTS_N_INSNS (2);
break;
}
- return false;
+ return true;
}
/* Cost of a libcall. We assume one insn per argument, an amount for the
*cost = LIBCALL_COST (1);
return false;
+ case UNSPEC_VOLATILE:
case UNSPEC:
return arm_unspec_cost (x, outer_code, speed_p, cost);