From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 116117 invoked by alias); 2 Oct 2015 08:19:36 -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 116103 invoked by uid 89); 2 Oct 2015 08:19:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.2 X-HELO: eu-smtp-delivery-143.mimecast.com Received: from eu-smtp-delivery-143.mimecast.com (HELO eu-smtp-delivery-143.mimecast.com) (146.101.78.143) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 02 Oct 2015 08:19:34 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-13-jN2jRMRxTQ2PLHJRcSdXnw-1; Fri, 02 Oct 2015 09:19:29 +0100 Received: from localhost ([10.1.2.79]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 2 Oct 2015 09:19:28 +0100 From: Richard Sandiford To: Richard Biener Mail-Followup-To: Richard Biener ,Bernd Schmidt , GCC Patches , richard.sandiford@arm.com Cc: Bernd Schmidt , GCC Patches Subject: Re: Add a build_real_truncate helper function References: <87y4fmya1j.fsf@e105548-lin.cambridge.arm.com> <560D3A98.7060803@redhat.com> Date: Fri, 02 Oct 2015 08:19:00 -0000 In-Reply-To: (Richard Biener's message of "Fri, 2 Oct 2015 09:07:54 +0100") Message-ID: <87pp0xy967.fsf@e105548-lin.cambridge.arm.com> User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 X-MC-Unique: jN2jRMRxTQ2PLHJRcSdXnw-1 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2015-10/txt/msg00169.txt.bz2 Richard Biener writes: > On Thu, Oct 1, 2015 at 3:52 PM, Bernd Schmidt wrote: >> On 10/01/2015 03:48 PM, Richard Sandiford wrote: >>> >>> ...which simplifies the match.pd patterns I'm about to add. >>> >>> Bootstrapped & regression-tested on x86_64-linux-gnu. OK to install? >> >> >> Ok. > > I wonder if it's worth a separate function - why not truncate > unconditionally in build_real? I suppose build_real would then be doing implicit rounding, whereas it sounds like it should just be converting between representations. The new function makes it explicit that the value is being changed in the process. > In fact it looks like we might have non-canonical REAL_CSTs with > excess precision? Maybe there should be an assert in build_real to catch that? Although I don't really have time to offer to do that. If you think we have a bug here then I can file a PR. Thanks, Richard