From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 54338 invoked by alias); 12 Jun 2017 06:36:39 -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 53563 invoked by uid 89); 12 Jun 2017 06:36:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.7 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1697, 20170503, 2017-05-03 X-HELO: mail-wr0-f172.google.com Received: from mail-wr0-f172.google.com (HELO mail-wr0-f172.google.com) (209.85.128.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 12 Jun 2017 06:36:37 +0000 Received: by mail-wr0-f172.google.com with SMTP id q97so84561266wrb.2 for ; Sun, 11 Jun 2017 23:36:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:mail-followup-to:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=6TTPKn9LOLbwiK8u3hwRwrHTMaQacKuE7ivB+LJzGmo=; b=fI69fjfq/yrBdLjzhmGC0Rkgv7Dod+ORh4J9sOw0r2OmcHDj4nERPPQ45NhjD9fi6Y 1qKzqQnLA/9iFbmYUWymsYpD6nGNOViN3enoL43jj0IoHBY9sXFPXJZlkC8//dJqStRG VMeAE8uWmUk286/clxkpGRVwRXufJB+Saxjg9ZrHrm6bdi/00hAayG0jlqXn2fpFESuf OGnKh1+Pq5IVz0F4S4uFZXv3SgONZXLvPEjtoRSCBUABiX1Cnv98/PG1TICALytSU/7Y U+NoDLeIKtjhgJ15LWsYv7otH4VK4jg3pg2e81lo4QR5E/Dj7PzH/92+9CATc0HrNyVP o5TQ== X-Gm-Message-State: AKS2vOxSqqcPJXO+kJoTBnMRNmtV/UkfClVIe05Gwz+OQR0f7bMUgLZ7 AVusMjFmfb24xKBSCRXuzg== X-Received: by 10.28.87.72 with SMTP id l69mr6286312wmb.111.1497249399241; Sun, 11 Jun 2017 23:36:39 -0700 (PDT) Received: from localhost (92.40.248.71.threembb.co.uk. [92.40.248.71]) by smtp.gmail.com with ESMTPSA id p187sm11534286wmd.20.2017.06.11.23.36.38 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 11 Jun 2017 23:36:38 -0700 (PDT) From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, richard.sandiford@linaro.org Subject: Re: Fix pessimistic DImode handling in combine.c:make_field_assignment References: <87efvezmdl.fsf@linaro.org> <87poeqoitd.fsf@linaro.org> Date: Mon, 12 Jun 2017 06:36:00 -0000 In-Reply-To: <87poeqoitd.fsf@linaro.org> (Richard Sandiford's message of "Tue, 30 May 2017 09:22:22 +0100") Message-ID: <87vao1soei.fsf@linaro.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2017-06/txt/msg00741.txt.bz2 Ping Richard Sandiford writes: > Richard Sandiford writes: >> The make_field_assignment code: >> >> src = force_to_mode (src, mode, >> GET_MODE_PRECISION (mode) >= HOST_BITS_PER_WIDE_INT >> ? HOST_WIDE_INT_M1U >> : (HOST_WIDE_INT_1U << len) - 1, >> 0); >> >> would ignore the field length len for DImode, even though DImode can be >> handled using HWIs. I think the code should be testing len instead. >> >> The patch was originally part of the SVE machine_mode series. >> Retesting showed that it changed the asm output on powerpc for a few >> tests, so I thought it should go in separately. Each test change >> seemed to be an improvement. >> >> Tested on aarch64-linux-gnu and x86_64-linux-gnu. I no longer have >> access to the compile farm to test on the powerpc boxes there. > > Now tested on powerpc64le-linux-gnu too (thanks to Segher for the access). > >> Thanks, >> Richard >> >> >> 2017-05-24 Richard Sandiford >> >> gcc/ >> * combine.c (make_field_assignment): Check len rather than the mode >> precision when calling force_to_mode. >> >> Index: gcc/combine.c >> =================================================================== >> --- gcc/combine.c 2017-05-03 08:46:32.777861592 +0100 >> +++ gcc/combine.c 2017-05-24 09:25:25.170351268 +0100 >> @@ -9634,7 +9634,7 @@ make_field_assignment (rtx x) >> other, pos), >> dest); >> src = force_to_mode (src, mode, >> - GET_MODE_PRECISION (mode) >= HOST_BITS_PER_WIDE_INT >> + len >= HOST_BITS_PER_WIDE_INT >> ? HOST_WIDE_INT_M1U >> : (HOST_WIDE_INT_1U << len) - 1, >> 0);