simplify-rtx.c (simplify_binary_operation): Do not simplify inner elements of constan...
authorUros Bizjak <uros@kss-loka.si>
Tue, 23 Nov 2004 16:20:51 +0000 (17:20 +0100)
committerUros Bizjak <uros@gcc.gnu.org>
Tue, 23 Nov 2004 16:20:51 +0000 (17:20 +0100)
rtl-optimization/18614
        * simplify-rtx.c (simplify_binary_operation): Do not
        simplify inner elements of constant arguments of
        VEC_CONCAT insn.

testsuite:

        * gcc.dg/pr18614-1.c: New test.

From-SVN: r91094

gcc/ChangeLog
gcc/simplify-rtx.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr18614-1.c [new file with mode: 0644]

index 1e5b3a647a289dee689fd9363f556c211df8ad05..3342ad1018d61b8b458f3c287289fb24031820ae 100644 (file)
@@ -1,3 +1,10 @@
+2004-11-23  Uros Bizjak  <uros@kss-loka.si>
+
+        PR rtl-optimization/18614
+        * simplify-rtx.c (simplify_binary_operation): Do not
+        simplify inner elements of constant arguments of
+        VEC_CONCAT insn.
+
 2004-11-23  Eric Botcazou  <ebotcazou@libertysurf.fr>
 
        * gthr-solaris.h (__gthread_recursive_mutex_init_function): Use
index a9d4ba3e5d24597ea881c9c2e6e53a92f5b71b33..ac896ab27ab4b95d8990a4091fd5dea4d9d91c13 100644 (file)
@@ -1185,6 +1185,7 @@ simplify_binary_operation (enum rtx_code code, enum machine_mode mode,
   trueop1 = avoid_constant_pool_reference (op1);
 
   if (VECTOR_MODE_P (mode)
+      && code != VEC_CONCAT
       && GET_CODE (trueop0) == CONST_VECTOR
       && GET_CODE (trueop1) == CONST_VECTOR)
     {
index 605cad3d5888fbfc5d78750978fc75cdbf48e6f0..91a04a829f0a952ba00ec72439604c89e9d46a2d 100644 (file)
@@ -1,3 +1,7 @@
+2004-11-23  Uros Bizjak <uros@kss-loka.si>
+
+       * gcc.dg/pr18614-1.c: New test.
+
 2004-11-23  Eric Botcazou  <ebotcazou@libertysurf.fr>
 
        * gcc.dg/setjmp-2.c: New test.
diff --git a/gcc/testsuite/gcc.dg/pr18614-1.c b/gcc/testsuite/gcc.dg/pr18614-1.c
new file mode 100644 (file)
index 0000000..db1870c
--- /dev/null
@@ -0,0 +1,15 @@
+/* PR rtl-optimization/18614 */
+/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -msse2" } */
+
+typedef double v2df __attribute__ ((vector_size (16)));
+
+v2df foo (void)
+{
+  v2df yd = { 1.0, 4.0 };
+  v2df xd;
+
+  xd = __builtin_ia32_cvtps2pd (__builtin_ia32_rsqrtps
+                               (__builtin_ia32_cvtpd2ps (yd)));
+  return xd;
+}