From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28217 invoked by alias); 4 Nov 2013 19:33:34 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 28201 invoked by uid 89); 4 Nov 2013 19:33:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.8 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RDNS_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no version=3.3.2 X-HELO: mail-ve0-f171.google.com Received: from Unknown (HELO mail-ve0-f171.google.com) (209.85.128.171) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Mon, 04 Nov 2013 19:33:32 +0000 Received: by mail-ve0-f171.google.com with SMTP id pa12so1808978veb.30 for ; Mon, 04 Nov 2013 11:33:24 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.52.170.232 with SMTP id ap8mr774962vdc.40.1383593604714; Mon, 04 Nov 2013 11:33:24 -0800 (PST) Received: by 10.221.63.73 with HTTP; Mon, 4 Nov 2013 11:33:24 -0800 (PST) In-Reply-To: <1383543252.6275.305.camel@gnopaine> References: <1383543252.6275.305.camel@gnopaine> Date: Mon, 04 Nov 2013 19:44:00 -0000 Message-ID: Subject: Re: [PATCH, rs6000] (2/3) Fix widening multiply high/low operations for little endian From: David Edelsohn To: Bill Schmidt Cc: GCC Patches Content-Type: text/plain; charset=ISO-8859-1 X-SW-Source: 2013-11/txt/msg00274.txt.bz2 On Mon, Nov 4, 2013 at 12:34 AM, Bill Schmidt wrote: > Hi, > > This patch fixes the widening multiply high/low operations to work > correctly in the presence of the first patch of this series, which > reverses the meanings of multiply even/odd instructions. Here we > reorder the input operands to the vector merge low/high instructions. > > The general rule is that vmrghh(x,y) [BE] = vmrglh(y,x) [LE], and so on; > that is, we need to reverse the usage of merge high and merge low, and > also swap their inputs, to obtain the same semantics. In this case we > are only swapping the inputs, because the reversed usage of high and low > has already been done for us in the generic handling code for > VEC_WIDEN_MULT_LO_EXPR. > > Bootstrapped and tested with the rest of the patch set on > powerpc64{,le}-unknown-linux-gnu, with no regressions. Is this ok for > trunk? > > Thanks, > Bill > > > 2013-11-03 Bill Schmidt > > * config/rs6000/altivec.md (vec_widen_umult_hi_v16qi): Swap > arguments to merge instruction for little endian. > (vec_widen_umult_lo_v16qi): Likewise. > (vec_widen_smult_hi_v16qi): Likewise. > (vec_widen_smult_lo_v16qi): Likewise. > (vec_widen_umult_hi_v8hi): Likewise. > (vec_widen_umult_lo_v8hi): Likewise. > (vec_widen_smult_hi_v8hi): Likewise. > (vec_widen_smult_lo_v8hi): Likewise. This patch is okay. I agree with Richard's suggestion to address the other parts of the patch by restructuring the patterns. Thanks, David