Tue Aug 19 16:01:36 CEST 2003 Jan Hubicka <jh@suse.cz>
PR target/8869
* expr.c (convert_modes): Deal properly with integer to vector
constant conversion.
Index: expr.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/expr.c,v
retrieving revision 1.576
diff -c -3 -p -r1.576 expr.c
*** expr.c 12 Aug 2003 01:45:22 -0000 1.576
--- expr.c 19 Aug 2003 14:01:14 -0000
*************** convert_modes (enum machine_mode mode, e
*** 1419,1424 ****
--- 1419,1433 ----
return gen_lowpart (mode, x);
}
+ /* Converting from integer constant into mode is always equivalent
to an
+ subreg operation. */
+ if (VECTOR_MODE_P (mode) && GET_MODE (x) == VOIDmode)
+ {
+ if (GET_MODE_BITSIZE (mode) != GET_MODE_BITSIZE (oldmode))
+ abort ();
+ return simplify_gen_subreg (mode, x, oldmode, 0);
+ }
+
temp = gen_reg_rtx (mode);
convert_move (temp, x, unsignedp);
return temp;