public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fix sse_loadlps constraints (PR target/53759)
@ 2012-06-25 14:46 Jakub Jelinek
  2012-06-25 14:59 ` Richard Henderson
  0 siblings, 1 reply; 2+ messages in thread
From: Jakub Jelinek @ 2012-06-25 14:46 UTC (permalink / raw)
  To: Uros Bizjak, Richard Henderson; +Cc: gcc-patches

Hi!

When the sse_loadlps and avx_loadlps patterns were merged together using
enabled attribute, apparently vmovlps alternative got a typo,
x <- x, x alternative is there already earlier, vmovlps should be
x <- m, 0 for noavx (that is right) and x <- m, x for avx.

Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk/4.7?

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.

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

--- gcc/config/i386/sse.md.jj	2012-06-25 08:38:32.000000000 +0200
+++ gcc/config/i386/sse.md	2012-06-25 09:53:57.622335534 +0200
@@ -3943,7 +3943,7 @@ (define_expand "sse_loadlps_exp"
 (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)]))))]
--- gcc/testsuite/gcc.target/i386/pr53759.c.jj	2012-06-25 10:09:29.075376198 +0200
+++ gcc/testsuite/gcc.target/i386/pr53759.c	2012-06-25 10:09:19.000000000 +0200
@@ -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\]" } } */

	Jakub

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Fix sse_loadlps constraints (PR target/53759)
  2012-06-25 14:46 [PATCH] Fix sse_loadlps constraints (PR target/53759) Jakub Jelinek
@ 2012-06-25 14:59 ` Richard Henderson
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Henderson @ 2012-06-25 14:59 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Uros Bizjak, gcc-patches

On 2012-06-25 07:42, Jakub Jelinek wrote:
> 	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.


Ok,.


r~

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-06-25 14:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-25 14:46 [PATCH] Fix sse_loadlps constraints (PR target/53759) Jakub Jelinek
2012-06-25 14:59 ` Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).