[multiple changes]
authorGeoffrey Keating <geoffk@apple.com>
Tue, 30 Aug 2005 07:32:39 +0000 (07:32 +0000)
committerGeoffrey Keating <geoffk@gcc.gnu.org>
Tue, 30 Aug 2005 07:32:39 +0000 (07:32 +0000)
2005-08-29  Geoffrey Keating  <geoffk@apple.com>

* config/i386/i386.c (ix86_expand_vector_init_one_var): Don't modify
parts of 'vals'.

Index: testsuite/ChangeLog
2005-08-30  Geoffrey Keating  <geoffk@apple.com>

* g++.dg/other/i386-1.C: New.

From-SVN: r103632

gcc/ChangeLog
gcc/config/i386/i386.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/other/i386-1.C [new file with mode: 0644]

index d192d0a..10d3d11 100644 (file)
@@ -1,3 +1,8 @@
+2005-08-29  Geoffrey Keating  <geoffk@apple.com>
+
+       * config/i386/i386.c (ix86_expand_vector_init_one_var): Don't modify
+       parts of 'vals'.
+
 2005-08-18  Andrew Pinski  <pinskia@physics.uc.edu>
 
        PR middle-end/23408
index eba7bb4..1c4fc13 100644 (file)
@@ -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)
     {
index 05e68f5..b6a2aae 100644 (file)
@@ -1,3 +1,7 @@
+2005-08-30  Geoffrey Keating  <geoffk@apple.com>
+
+       * g++.dg/other/i386-1.C: New.
+
 2005-08-30  Jakub Jelinek  <jakub@redhat.com>
 
        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 (file)
index 0000000..4837197
--- /dev/null
@@ -0,0 +1,20 @@
+/* { dg-do run { target i?86-*-* } } */
+/* { dg-options "-march=pentium4" } */
+
+#include <xmmintrin.h>
+#include <stdio.h>
+
+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);
+}