Commit 26689420 by David S. Miller Committed by David S. Miller

Fix illegal register substitutions on big-endian during cprop_reg.

	* regcprop.c (copyprop_hardreg_forward_1): Reject the
	transformation when we narrow the mode on big endian.

From-SVN: r180600
parent 53b51666
2011-10-27 David S. Miller <davem@davemloft.net>
* regcprop.c (copyprop_hardreg_forward_1): Reject the
transformation when we narrow the mode on big endian.
2011-10-27 Jakub Jelinek <jakub@redhat.com>
* config/i386/sse.md (avx_cvtpd2dq256_2, avx_cvttpd2dq256_2,
......@@ -824,6 +824,14 @@ copyprop_hardreg_forward_1 (basic_block bb, struct value_data *vd)
if (hard_regno_nregs[regno][mode]
> hard_regno_nregs[regno][vd->e[regno].mode])
goto no_move_special_case;
/* And likewise, if we are narrowing on big endian the transformation
is also invalid. */
if (hard_regno_nregs[regno][mode]
< hard_regno_nregs[regno][vd->e[regno].mode]
&& (GET_MODE_SIZE (vd->e[regno].mode) > UNITS_PER_WORD
? WORDS_BIG_ENDIAN : BYTES_BIG_ENDIAN))
goto no_move_special_case;
}
/* If the destination is also a register, try to find a source
......
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