From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18075 invoked by alias); 14 Jul 2011 14:41:44 -0000 Received: (qmail 18067 invoked by uid 22791); 14 Jul 2011 14:41:43 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-yx0-f175.google.com (HELO mail-yx0-f175.google.com) (209.85.213.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 14 Jul 2011 14:41:30 +0000 Received: by yxi19 with SMTP id 19so135881yxi.20 for ; Thu, 14 Jul 2011 07:41:29 -0700 (PDT) MIME-Version: 1.0 Received: by 10.151.87.5 with SMTP id p5mr2435613ybl.80.1310654489203; Thu, 14 Jul 2011 07:41:29 -0700 (PDT) Received: by 10.151.144.19 with HTTP; Thu, 14 Jul 2011 07:41:28 -0700 (PDT) In-Reply-To: <4E1EFF68.10201@codesourcery.com> References: <4E034EF2.3070503@codesourcery.com> <4E03511F.9040507@codesourcery.com> <4E09FFEF.6010603@codesourcery.com> <4E1EFF68.10201@codesourcery.com> Date: Thu, 14 Jul 2011 14:48:00 -0000 Message-ID: Subject: Re: [PATCH (7/7)] Mixed-sign multiplies using narrowest mode From: Richard Guenther To: Andrew Stubbs Cc: gcc-patches@gcc.gnu.org, patches@linaro.org Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes 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 X-SW-Source: 2011-07/txt/msg01163.txt.bz2 On Thu, Jul 14, 2011 at 4:38 PM, Andrew Stubbs wrote: > On 28/06/11 17:23, Andrew Stubbs wrote: >> >> On 23/06/11 15:43, Andrew Stubbs wrote: >>> >>> Patch 4 introduced support for using signed multiplies to code unsigned >>> multiplies in a narrower mode. Patch 5 then introduced support for >>> mis-matched input modes. >>> >>> These two combined mean that there is case where only the smaller of two >>> inputs is unsigned, and yet it still tries to user a mode wider than the >>> larger, signed input. This is bad because it means unnecessary extends >>> and because the wider operation might not exist. >>> >>> This patch catches that case, and ensures that the smaller, unsigned >>> input, is zero-extended to match the mode of the larger, signed input. >>> >>> Of course, both inputs may still have to be extended to fit the nearest >>> available instruction, so it doesn't make a difference every time. >>> >>> OK? >> >> This update fixes Janis' issue with the testsuite. > > And this version is updated to fit the changes made earlier in the series, > and also to use the precision, instead of the mode-size, in order to better > optimize bitfields. > > OK? Ok. Thanks, Richard. > Andrew >