re PR target/53759 (gcc -mavx emits vshufps for __builtin_ia32_loadlps)
authorJakub Jelinek <jakub@redhat.com>
Mon, 25 Jun 2012 14:52:59 +0000 (16:52 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 25 Jun 2012 14:52:59 +0000 (16:52 +0200)
PR target/53759
* config/i386/sse.md (sse_loadlps): Use x m x constraints instead
of x x x in the vmovlps load alternative.

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

From-SVN: r188937

gcc/ChangeLog
gcc/config/i386/sse.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr53759.c [new file with mode: 0644]

index 8ccdaf02d31e33ca55db9c5eed20dd44035d8d49..c8146fbb88b380ef4f6665f02fc4e99dd54089f5 100644 (file)
@@ -1,3 +1,9 @@
+2012-06-25  Jakub Jelinek  <jakub@redhat.com>
+
+       PR target/53759
+       * config/i386/sse.md (sse_loadlps): Use x m x constraints instead
+       of x x x in the vmovlps load alternative.
+
 2012-06-25  Richard Sandiford  <rdsandiford@googlemail.com>
 
        PR debug/53740
index 691256d5e21b5ed4a145f159947fb63eeea66df1..42b48bc811549f60b016c8eb512bc8ab1cacff82 100644 (file)
 (define_insn "sse_loadlps"
   [(set (match_operand:V4SF 0 "nonimmediate_operand"     "=x,x,x,x,m")
        (vec_concat:V4SF
-         (match_operand:V2SF 2 "nonimmediate_operand"   " 0,x,m,x,x")
+         (match_operand:V2SF 2 "nonimmediate_operand"   " 0,x,m,m,x")
          (vec_select:V2SF
            (match_operand:V4SF 1 "nonimmediate_operand" " x,x,0,x,0")
            (parallel [(const_int 2) (const_int 3)]))))]
index 82bb2d775e21a5ba5a49058c74c349f543bf6a8c..6fa762aac164a139aa07a59c0f83f55023227cbd 100644 (file)
@@ -1,5 +1,8 @@
 2012-06-25  Jakub Jelinek  <jakub@redhat.com>
 
+       PR target/53759
+       * gcc.target/i386/pr53759.c: New test.
+
        PR c++/53594
        * g++.dg/cpp0x/nsdmi7.C: New test.
 
diff --git a/gcc/testsuite/gcc.target/i386/pr53759.c b/gcc/testsuite/gcc.target/i386/pr53759.c
new file mode 100644 (file)
index 0000000..b824b98
--- /dev/null
@@ -0,0 +1,17 @@
+/* PR target/53759 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx" } */
+/* { dg-require-effective-target avx } */
+
+#include <xmmintrin.h>
+
+void
+foo (__m128 *x, __m64 *y)
+{
+  __m128 a = _mm_setzero_ps ();
+  __m128 b = _mm_loadl_pi (a, y);
+  *x = _mm_add_ps (b, b);
+}
+
+/* { dg-final { scan-assembler "vmovlps\[ \\t\]" } } */
+/* { dg-final { scan-assembler-not "vshufps\[ \\t\]" } } */