Commit 99c2b71f by Ian Lance Taylor

Check the mode when checking values equivalent to sreg

From-SVN: r14009
parent dbd7556e
...@@ -8035,8 +8035,21 @@ reload_cse_noop_set_p (set, insn) ...@@ -8035,8 +8035,21 @@ reload_cse_noop_set_p (set, insn)
for (x = reg_values[sreg]; x; x = XEXP (x, 1)) for (x = reg_values[sreg]; x; x = XEXP (x, 1))
{ {
if (XEXP (x, 0) != 0 rtx tmp;
&& reload_cse_regno_equal_p (dreg, XEXP (x, 0), dest_mode))
if (XEXP (x, 0) == 0)
continue;
if (dest_mode == GET_MODE (x))
tmp = XEXP (x, 0);
else if (GET_MODE_BITSIZE (dest_mode)
< GET_MODE_BITSIZE (GET_MODE (x)))
tmp = gen_lowpart_common (dest_mode, XEXP (x, 0));
else
continue;
if (tmp
&& reload_cse_regno_equal_p (dreg, tmp, dest_mode))
{ {
ret = 1; ret = 1;
break; break;
......
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