OSDN Git Service

PR middle-end/26379
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 21 Feb 2006 08:09:08 +0000 (08:09 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 21 Feb 2006 08:09:08 +0000 (08:09 +0000)
* combine.c (simplify_shift_const_1): Disable nested shifts
optimization for vector shifts.

* gcc.target/i386/mmx-7.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@111328 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/combine.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/mmx-7.c [new file with mode: 0644]

index 0349d92..eee818b 100644 (file)
@@ -1,3 +1,9 @@
+2006-02-21  Jakub Jelinek  <jakub@redhat.com>
+
+       PR middle-end/26379
+       * combine.c (simplify_shift_const_1): Disable nested shifts
+       optimization for vector shifts.
+
 2006-02-20  Roger Sayle  <roger@eyesopen.com>
 
        PR tree-optimization/26361
index 96ebd20..9240b32 100644 (file)
@@ -8737,7 +8737,8 @@ simplify_shift_const_1 (enum rtx_code code, enum machine_mode result_mode,
              && INTVAL (XEXP (varop, 1)) >= 0
              && INTVAL (XEXP (varop, 1)) < GET_MODE_BITSIZE (GET_MODE (varop))
              && GET_MODE_BITSIZE (result_mode) <= HOST_BITS_PER_WIDE_INT
-             && GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_WIDE_INT)
+             && GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_WIDE_INT
+             && !VECTOR_MODE_P (result_mode))
            {
              enum rtx_code first_code = GET_CODE (varop);
              unsigned int first_count = INTVAL (XEXP (varop, 1));
index cf2d999..266489f 100644 (file)
@@ -1,3 +1,8 @@
+2006-02-21  Jakub Jelinek  <jakub@redhat.com>
+
+       PR middle-end/26379
+       * gcc.target/i386/mmx-7.c: New test.
+
 2006-02-20  Roger Sayle  <roger@eyesopen.com>
 
        PR tree-optimization/26361
diff --git a/gcc/testsuite/gcc.target/i386/mmx-7.c b/gcc/testsuite/gcc.target/i386/mmx-7.c
new file mode 100644 (file)
index 0000000..683ca10
--- /dev/null
@@ -0,0 +1,18 @@
+/* PR middle-end/26379 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -mmmx" } */
+
+#include <mmintrin.h>
+
+void
+foo (__m64 *p)
+{
+  __m64 m;
+
+  m = p[0];
+  m = _mm_srli_pi16(m, 2);
+  m = _mm_slli_pi16(m, 8);
+
+  p[0] = m;
+  _mm_empty();
+}