Patchwork [i386] Fix wrong mode in pmaddubsw instruction pattern

login
register
mail settings
Submitter Uros Bizjak
Date March 3, 2011, 7:39 p.m.
Message ID <AANLkTi=pnvZUaWoUj=9M_OsHBV491nk=ukw+eaUM8OQD@mail.gmail.com>
Download mbox | patch
Permalink /patch/85330/
State New
Headers show

Comments

Uros Bizjak - March 3, 2011, 7:39 p.m.
On Thu, Mar 3, 2011 at 3:29 PM, Uros Bizjak <ubizjak@gmail.com> wrote:

>> When I read sse.md, I find there is a type error in vpmaddubsw
>> define_insn pattern.
>> Attached is the patch that fix the type error.
>> Is it OK to commit to 4.6 trunk?
>
> The same problem is with ssse3_pmadddubsw128 pattern.  Can you also
> provide the ChangeLog for the patch and how you test the change?

Attached patch fixes all problems found with the mode of VEC_SELECT
RTXes in pmaddubsw patterns.

2011-03-03  Uros Bizjak  <ubizjak@gmail.com>

	* config/i386/sse.md (*avx_pmaddubsw128): Fix mode of VEC_SELECT RTX.
	(ssse3_pmaddubsw128): Ditto.
	(ssse3_pmaddubsw): Ditto.

Patch was bootstrapped and regression tested on x86_64-pc-linux-gnu
{,-m32} and will be committed to 4.6, 4.5 and 4.4 branches.

Thanks,
Uros.

Patch

Index: sse.md
===================================================================
--- sse.md	(revision 170658)
+++ sse.md	(working copy)
@@ -8885,7 +8885,7 @@ 
 	(ss_plus:V8HI
 	  (mult:V8HI
 	    (zero_extend:V8HI
-	      (vec_select:V4QI
+	      (vec_select:V8QI
 		(match_operand:V16QI 1 "register_operand" "x")
 		(parallel [(const_int 0)
 			   (const_int 2)
@@ -8908,7 +8908,7 @@ 
 			   (const_int 14)]))))
 	  (mult:V8HI
 	    (zero_extend:V8HI
-	      (vec_select:V16QI (match_dup 1)
+	      (vec_select:V8QI (match_dup 1)
 		(parallel [(const_int 1)
 			   (const_int 3)
 			   (const_int 5)
@@ -8918,7 +8918,7 @@ 
 			   (const_int 13)
 			   (const_int 15)])))
 	    (sign_extend:V8HI
-	      (vec_select:V16QI (match_dup 2)
+	      (vec_select:V8QI (match_dup 2)
 		(parallel [(const_int 1)
 			   (const_int 3)
 			   (const_int 5)
@@ -8939,7 +8939,7 @@ 
 	(ss_plus:V8HI
 	  (mult:V8HI
 	    (zero_extend:V8HI
-	      (vec_select:V4QI
+	      (vec_select:V8QI
 		(match_operand:V16QI 1 "register_operand" "0")
 		(parallel [(const_int 0)
 			   (const_int 2)
@@ -8962,7 +8962,7 @@ 
 			   (const_int 14)]))))
 	  (mult:V8HI
 	    (zero_extend:V8HI
-	      (vec_select:V16QI (match_dup 1)
+	      (vec_select:V8QI (match_dup 1)
 		(parallel [(const_int 1)
 			   (const_int 3)
 			   (const_int 5)
@@ -8972,7 +8972,7 @@ 
 			   (const_int 13)
 			   (const_int 15)])))
 	    (sign_extend:V8HI
-	      (vec_select:V16QI (match_dup 2)
+	      (vec_select:V8QI (match_dup 2)
 		(parallel [(const_int 1)
 			   (const_int 3)
 			   (const_int 5)
@@ -9009,13 +9009,13 @@ 
 			   (const_int 6)]))))
 	  (mult:V4HI
 	    (zero_extend:V4HI
-	      (vec_select:V8QI (match_dup 1)
+	      (vec_select:V4QI (match_dup 1)
 		(parallel [(const_int 1)
 			   (const_int 3)
 			   (const_int 5)
 			   (const_int 7)])))
 	    (sign_extend:V4HI
-	      (vec_select:V8QI (match_dup 2)
+	      (vec_select:V4QI (match_dup 2)
 		(parallel [(const_int 1)
 			   (const_int 3)
 			   (const_int 5)