Commit f8a30250 by Alexandre Oliva Committed by Alexandre Oliva

reload1.c (reload_cse_move2add): Don't turn an implicit truncation into a…

reload1.c (reload_cse_move2add): Don't turn an implicit truncation into a self-set in the narrow mode.

* reload1.c (reload_cse_move2add): Don't turn an implicit
truncation into a self-set in the narrow mode.

From-SVN: r66638
parent e912eadf
2003-05-09 Alexandre Oliva <aoliva@redhat.com>
* reload1.c (reload_cse_move2add): Don't turn an implicit
truncation into a self-set in the narrow mode.
2003-05-09 Richard Earnshaw <rearnsha@arm.com>
* arm.md (clzsi2): The CLZ instruction is predicable.
......
......@@ -9166,7 +9166,14 @@ reload_cse_move2add (first)
value flag. jump2 already knows how to get rid of
no-op moves. */
if (new_src == const0_rtx)
validate_change (insn, &SET_SRC (pat), reg, 0);
{
/* If the constants are different, this is a
truncation, that, if turned into (set (reg)
(reg)), would be discarded. Maybe we should
try a truncMN pattern? */
if (INTVAL (src) == reg_offset [regno])
validate_change (insn, &SET_SRC (pat), reg, 0);
}
else if (rtx_cost (new_src, PLUS) < rtx_cost (src, SET)
&& have_add2_insn (reg, new_src))
{
......@@ -9252,9 +9259,15 @@ reload_cse_move2add (first)
int success = 0;
if (new_src == const0_rtx)
/* See above why we create (set (reg) (reg)) here. */
success
= validate_change (next, &SET_SRC (set), reg, 0);
{
if (INTVAL (src) == reg_offset [regno])
/* See above why we create (set (reg)
(reg)) here. */
success
= validate_change (next, &SET_SRC (set), reg, 0);
else
success = 0;
}
else if ((rtx_cost (new_src, PLUS)
< COSTS_N_INSNS (1) + rtx_cost (src3, SET))
&& have_add2_insn (reg, new_src))
......
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