diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d192d0a836f..10d3d1134aa 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2005-08-29 Geoffrey Keating + + * config/i386/i386.c (ix86_expand_vector_init_one_var): Don't modify + parts of 'vals'. + 2005-08-18 Andrew Pinski PR middle-end/23408 diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index eba7bb48321..1c4fc139b51 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -17201,8 +17201,8 @@ ix86_expand_vector_init_one_var (bool mmx_ok, enum machine_mode mode, enum machine_mode wmode; rtx const_vec, x; - XVECEXP (vals, 0, one_var) = CONST0_RTX (GET_MODE_INNER (mode)); - const_vec = gen_rtx_CONST_VECTOR (mode, XVEC (vals, 0)); + const_vec = copy_rtx (vals); + XVECEXP (const_vec, 0, one_var) = CONST0_RTX (GET_MODE_INNER (mode)); switch (mode) { diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 05e68f5754e..b6a2aae1b3a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2005-08-30 Geoffrey Keating + + * g++.dg/other/i386-1.C: New. + 2005-08-30 Jakub Jelinek PR preprocessor/20348 diff --git a/gcc/testsuite/g++.dg/other/i386-1.C b/gcc/testsuite/g++.dg/other/i386-1.C new file mode 100644 index 00000000000..48371978a98 --- /dev/null +++ b/gcc/testsuite/g++.dg/other/i386-1.C @@ -0,0 +1,20 @@ +/* { dg-do run { target i?86-*-* } } */ +/* { dg-options "-march=pentium4" } */ + +#include +#include + +int main(int argc, char** argv) { + float a = 1.0f; + float b = 2.0f; + float c = 3.0f; + float r; + + __m128 v = _mm_set_ps(a, b, c, 0); + + v = (__m128)_mm_srli_si128((__m128i)v, 4); + _mm_store_ss(&r, v); + if (r != 3.0f) + abort (); + exit (0); +}