Commit 80ba02b1 by J"orn Rennecke Committed by Joern Rennecke

combine.c (gen_lowpart_for_combine): Handle vector modes.

	* combine.c (gen_lowpart_for_combine): Handle vector modes.
	Supply non-VOID mode to simplify_gen_subreg.

From-SVN: r55375
parent 6e04241f
Wed Jul 10 19:50:03 2002 J"orn Rennecke <joern.rennecke@superh.com>
* combine.c (gen_lowpart_for_combine): Handle vector modes.
Supply non-VOID mode to simplify_gen_subreg.
Wed Jul 10 18:48:55 CEST 2002 Jan Hubicka <jh@suse.cz> Wed Jul 10 18:48:55 CEST 2002 Jan Hubicka <jh@suse.cz>
* i386.c (ix86_init_mmx_sse_builtins): Fix thinko. * i386.c (ix86_init_mmx_sse_builtins): Fix thinko.
......
...@@ -9831,12 +9831,6 @@ gen_lowpart_for_combine (mode, x) ...@@ -9831,12 +9831,6 @@ gen_lowpart_for_combine (mode, x)
|| GET_MODE_SIZE (GET_MODE (x)) == GET_MODE_SIZE (mode))) || GET_MODE_SIZE (GET_MODE (x)) == GET_MODE_SIZE (mode)))
return gen_rtx_CLOBBER (GET_MODE (x), const0_rtx); return gen_rtx_CLOBBER (GET_MODE (x), const0_rtx);
/* simplify_gen_subreg does not know how to handle the case where we try
to convert an integer constant to a vector.
??? We could try to teach it to generate CONST_VECTORs. */
if (GET_MODE (x) == VOIDmode && VECTOR_MODE_P (mode))
return gen_rtx_CLOBBER (GET_MODE (x), const0_rtx);
/* X might be a paradoxical (subreg (mem)). In that case, gen_lowpart /* X might be a paradoxical (subreg (mem)). In that case, gen_lowpart
won't know what to do. So we will strip off the SUBREG here and won't know what to do. So we will strip off the SUBREG here and
process normally. */ process normally. */
...@@ -9903,9 +9897,15 @@ gen_lowpart_for_combine (mode, x) ...@@ -9903,9 +9897,15 @@ gen_lowpart_for_combine (mode, x)
{ {
int offset = 0; int offset = 0;
rtx res; rtx res;
enum machine_mode sub_mode = GET_MODE (x);
offset = subreg_lowpart_offset (mode, GET_MODE (x)); offset = subreg_lowpart_offset (mode, sub_mode);
res = simplify_gen_subreg (mode, x, GET_MODE (x), offset); if (sub_mode == VOIDmode)
{
sub_mode = int_mode_for_mode (mode);
x = gen_lowpart_common (sub_mode, x);
}
res = simplify_gen_subreg (mode, x, sub_mode, offset);
if (res) if (res)
return res; return res;
return gen_rtx_CLOBBER (GET_MODE (x), const0_rtx); return gen_rtx_CLOBBER (GET_MODE (x), const0_rtx);
......
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