PR target/31334
* config/rs6000/rs6000.c (rs6000_expand_vector_init): Create a
const_vector when all the vectors are constant.
2008-03-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR target/31334
* gcc.target/powerpc/altivec-25.c: Nnew testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@133674
138bc75d-0d04-0410-961f-
82ee72b054a4
+2008-03-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
+
+ PR target/31334
+ * config/rs6000/rs6000.c (rs6000_expand_vector_init): Create a
+ const_vector when all the vectors are constant.
+
2008-03-27 Bob Wilson <bob.wilson@acm.org>
* config/xtensa/xtensa.c (gen_float_relational): Handle unordered
if (n_var == 0)
{
+ rtx const_vec = gen_rtx_CONST_VECTOR (mode, XVEC (vals, 0));
if (mode != V4SFmode && all_const_zero)
{
/* Zero register. */
gen_rtx_XOR (mode, target, target)));
return;
}
- else if (mode != V4SFmode && easy_vector_constant (vals, mode))
+ else if (mode != V4SFmode && easy_vector_constant (const_vec, mode))
{
/* Splat immediate. */
- emit_insn (gen_rtx_SET (VOIDmode, target, vals));
+ emit_insn (gen_rtx_SET (VOIDmode, target, const_vec));
return;
}
else if (all_same)
else
{
/* Load from constant pool. */
- emit_move_insn (target, gen_rtx_CONST_VECTOR (mode, XVEC (vals, 0)));
+ emit_move_insn (target, const_vec);
return;
}
}
+2008-03-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
+
+ PR target/31334
+ * gcc.target/powerpc/altivec-25.c: Nnew testcase.
+
2008-03-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/35724
--- /dev/null
+/* { dg-do compile { target powerpc*-*-* } } */
+/* { dg-require-effective-target powerpc_altivec_ok } */
+/* { dg-options "-maltivec -O2 -Wall" } */
+
+
+#define vector __attribute__((__vector_size__(16) ))
+vector int f()
+{
+ int t = 4;
+ return (vector int){t,t,t,t};
+}
+vector int f1()
+{
+ return (vector int){4,4,4,4};
+}
+
+/* We should be able to materialize the constant vector without
+ any lvewx instructions as it is constant. */
+/* { dg-final { scan-assembler-not "lvewx" } } */
+