Commit 53685896 by Bin Cheng Committed by Bin Cheng

* rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes.

From-SVN: r247509
parent 27c72a9b
2017-05-02 Bin Cheng <bin.cheng@arm.com>
* rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes.
2017-05-02 Xi Ruoyao <ryxi@stu.xidian.edu.cn> 2017-05-02 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
* tree.h (EXPR_CILK_SPAWN): Use macro TREE_CHECK2 instead of * tree.h (EXPR_CILK_SPAWN): Use macro TREE_CHECK2 instead of
function tree_check2. function tree_check2.
2017-05-02 Martin Liska <mliska@suse.cz> 2017-05-02 Martin Liska <mliska@suse.cz>
* doc/gcov.texi: Add missing preposition. * doc/gcov.texi: Add missing preposition.
......
...@@ -4164,6 +4164,14 @@ rtx_cost (rtx x, machine_mode mode, enum rtx_code outer_code, ...@@ -4164,6 +4164,14 @@ rtx_cost (rtx x, machine_mode mode, enum rtx_code outer_code,
return COSTS_N_INSNS (2 + factor); return COSTS_N_INSNS (2 + factor);
break; break;
case TRUNCATE:
/* If we can tie these modes, make this cheap. */
if (MODES_TIEABLE_P (mode, GET_MODE (SUBREG_REG (x))))
{
total = 0;
break;
}
/* FALLTHRU */
default: default:
if (targetm.rtx_costs (x, mode, outer_code, opno, &total, speed)) if (targetm.rtx_costs (x, mode, outer_code, opno, &total, speed))
return total; return total;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment