PR target/47665
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 10 Feb 2011 11:15:23 +0000 (11:15 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 10 Feb 2011 11:15:23 +0000 (11:15 +0000)
* combine.c (make_compound_operation): Only change shifts into
multiplication for SCALAR_INT_MODE_P.

* gcc.target/i386/pr47665.c: New test.

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

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

index 85e5f09..f041a02 100644 (file)
@@ -1,3 +1,9 @@
+2011-02-10  Jakub Jelinek  <jakub@redhat.com>
+
+       PR target/47665
+       * combine.c (make_compound_operation): Only change shifts into
+       multiplication for SCALAR_INT_MODE_P.
+
 2011-02-10  Jie Zhang  <jie@codesourcery.com>
 
        PR testsuite/47622
index 07ff0d4..f9d33b3 100644 (file)
@@ -7485,7 +7485,8 @@ make_compound_operation (rtx x, enum rtx_code in_code)
         an address.  */
       if (in_code == MEM && CONST_INT_P (XEXP (x, 1))
          && INTVAL (XEXP (x, 1)) < HOST_BITS_PER_WIDE_INT
-         && INTVAL (XEXP (x, 1)) >= 0)
+         && INTVAL (XEXP (x, 1)) >= 0
+         && SCALAR_INT_MODE_P (mode))
        {
          HOST_WIDE_INT count = INTVAL (XEXP (x, 1));
          HOST_WIDE_INT multval = (HOST_WIDE_INT) 1 << count;
index a3780dd..6a38531 100644 (file)
@@ -1,3 +1,8 @@
+2011-02-10  Jakub Jelinek  <jakub@redhat.com>
+
+       PR target/47665
+       * gcc.target/i386/pr47665.c: New test.
+
 2011-02-10  Jie Zhang  <jie@codesourcery.com>
 
        PR testsuite/47622
diff --git a/gcc/testsuite/gcc.target/i386/pr47665.c b/gcc/testsuite/gcc.target/i386/pr47665.c
new file mode 100644 (file)
index 0000000..10fabb5
--- /dev/null
@@ -0,0 +1,11 @@
+/* PR target/47665 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -msse2" } */
+
+#include <emmintrin.h>
+
+__m128d
+foo (double *x, __m128i y)
+{
+  return _mm_load_pd (x + _mm_cvtsi128_si32 (_mm_srli_si128 (_mm_slli_epi32 (y, 2), 0)));
+}