Patchwork PATCH: PR target/44534: _builtin_ia32_vextractf128_si256(X,N) acts as if N was always set to 1

login
register
mail settings
Submitter H.J. Lu
Date June 14, 2010, 5:04 p.m.
Message ID <20100614170422.GA15726@intel.com>
Download mbox | patch
Permalink /patch/55569/
State New
Headers show

Comments

H.J. Lu - June 14, 2010, 5:04 p.m.
Hi,

This patch fixes a typo in AVX vec_extract_lo_* patterns. OK for trunk,
4.5 and 4.4?

Thanks.


H.J.
---
gcc/

2010-06-14  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/44534
	* config/i386/sse.md (vec_extract_lo_<mode>): Replace 0x1 with
	0x0.
	(vec_extract_lo_v16hi): Likewise.
	(vec_extract_lo_v32qi): Likewise.

gcc/testsuite/

2010-06-14  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/44534
	* gcc.target/i386/avx-vextractf128-256-3.c: New.
	* gcc.target/i386/avx-vextractf128-256-4.c: Likewise.
Uros Bizjak - June 14, 2010, 5:41 p.m.
On Mon, 2010-06-14 at 10:04 -0700, H.J. Lu wrote:

> This patch fixes a typo in AVX vec_extract_lo_* patterns. OK for trunk,
> 4.5 and 4.4?

> gcc/
> 
> 2010-06-14  H.J. Lu  <hongjiu.lu@intel.com>
> 
> 	PR target/44534
> 	* config/i386/sse.md (vec_extract_lo_<mode>): Replace 0x1 with
> 	0x0.
> 	(vec_extract_lo_v16hi): Likewise.
> 	(vec_extract_lo_v32qi): Likewise.
> 
> gcc/testsuite/
> 
> 2010-06-14  H.J. Lu  <hongjiu.lu@intel.com>
> 
> 	PR target/44534
> 	* gcc.target/i386/avx-vextractf128-256-3.c: New.
> 	* gcc.target/i386/avx-vextractf128-256-4.c: Likewise.

OK everywhere.

Thanks,
Uros.

Patch

diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md
index d154f07..7625906 100644
--- a/gcc/config/i386/sse.md
+++ b/gcc/config/i386/sse.md
@@ -4213,7 +4213,7 @@ 
 	  (parallel [(const_int 0) (const_int 1)
 		     (const_int 2) (const_int 3)])))]
   "TARGET_AVX"
-  "vextractf128\t{$0x1, %1, %0|%0, %1, 0x1}"
+  "vextractf128\t{$0x0, %1, %0|%0, %1, 0x0}"
   [(set_attr "type" "sselog")
    (set_attr "prefix_extra" "1")
    (set_attr "length_immediate" "1")
@@ -4245,7 +4245,7 @@ 
 		     (const_int 4) (const_int 5)
 		     (const_int 6) (const_int 7)])))]
   "TARGET_AVX"
-  "vextractf128\t{$0x1, %1, %0|%0, %1, 0x1}"
+  "vextractf128\t{$0x0, %1, %0|%0, %1, 0x0}"
   [(set_attr "type" "sselog")
    (set_attr "prefix_extra" "1")
    (set_attr "length_immediate" "1")
@@ -4283,7 +4283,7 @@ 
 		     (const_int 12) (const_int 13)
 		     (const_int 14) (const_int 15)])))]
   "TARGET_AVX"
-  "vextractf128\t{$0x1, %1, %0|%0, %1, 0x1}"
+  "vextractf128\t{$0x0, %1, %0|%0, %1, 0x0}"
   [(set_attr "type" "sselog")
    (set_attr "prefix_extra" "1")
    (set_attr "length_immediate" "1")
--- /dev/null	2010-06-03 08:38:07.730259022 -0700
+++ gcc-release/gcc/testsuite/gcc.target/i386/avx-vextractf128-256-3.c	2010-06-14 09:49:51.621497536 -0700
@@ -0,0 +1,7 @@ 
+/* { dg-do run } */
+/* { dg-require-effective-target avx } */
+/* { dg-options "-O2 -mavx" } */
+
+#define OFFSET 0
+
+#include "avx-vextractf128-256-1.c"
--- /dev/null	2010-06-03 08:38:07.730259022 -0700
+++ gcc-release/gcc/testsuite/gcc.target/i386/avx-vextractf128-256-4.c	2010-06-14 09:50:05.188629783 -0700
@@ -0,0 +1,7 @@ 
+/* { dg-do run } */
+/* { dg-require-effective-target avx } */
+/* { dg-options "-O2 -mavx" } */
+
+#define OFFSET 0
+
+#include "avx-vextractf128-256-2.c"