From patchwork Thu Mar 3 19:39:38 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Uros Bizjak X-Patchwork-Id: 85330 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id C0CAD1007E5 for ; Fri, 4 Mar 2011 06:39:47 +1100 (EST) Received: (qmail 17729 invoked by alias); 3 Mar 2011 19:39:46 -0000 Received: (qmail 17720 invoked by uid 22791); 3 Mar 2011 19:39:45 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, TW_VP, TW_ZJ X-Spam-Check-By: sourceware.org Received: from mail-px0-f175.google.com (HELO mail-px0-f175.google.com) (209.85.212.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 03 Mar 2011 19:39:40 +0000 Received: by pxi17 with SMTP id 17so280933pxi.20 for ; Thu, 03 Mar 2011 11:39:38 -0800 (PST) MIME-Version: 1.0 Received: by 10.142.113.6 with SMTP id l6mr1088665wfc.296.1299181178238; Thu, 03 Mar 2011 11:39:38 -0800 (PST) Received: by 10.142.69.19 with HTTP; Thu, 3 Mar 2011 11:39:38 -0800 (PST) Date: Thu, 3 Mar 2011 20:39:38 +0100 Message-ID: Subject: [PATCH, i386] Fix wrong mode in pmaddubsw instruction pattern From: Uros Bizjak To: Liu Cc: gcc-patches@gcc.gnu.org, matt@3am-software.com, rth@redhat.com, jh@suse.cz Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org On Thu, Mar 3, 2011 at 3:29 PM, Uros Bizjak 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 * 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. 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)