From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17658 invoked by alias); 30 May 2017 08:22:25 -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 17645 invoked by uid 89); 30 May 2017 08:22:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.6 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=ham version=3.3.2 spammy=pessimistic X-HELO: mail-wm0-f42.google.com Received: from mail-wm0-f42.google.com (HELO mail-wm0-f42.google.com) (74.125.82.42) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 30 May 2017 08:22:22 +0000 Received: by mail-wm0-f42.google.com with SMTP id 7so81641773wmo.1 for ; Tue, 30 May 2017 01:22:26 -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=W2sd++L96E324ifR3szoWB/1MtrHyX49HFm+NXGBLDU=; b=i1uWlNEgSu/en62+nmnd7B+i3+E8/9Xib8b3HiyKOJNR5dsUa1DoDghe/eEpCZ4HSJ 6xdJz3AXBzNxeBzJ1Nhv3WL76VuXx/UCLkQmoI/YLoCKZUbogVBL0t+sXxPnH2TKpGh+ gaQmvSI/MCg1SA3SXEWNqWan3DYq101KG/25d5ZUf6BsMtJjqf3WkvywYqz13TrqI32n Ed/EX57hmqpBfyHSKMgz55N5UysyF9BpzNCb/sn7XjvBWVKuP9AVadjxHTIGU4UB7iMX 4AxdcuzYbnrTdYanzje9Hqbezyq8Ovn/v37N/xJA8MuTqsz4hHW0HCCnmT3dQOLev8AK uffw== X-Gm-Message-State: AODbwcAGXk2vA98LATmEmuLjVZSNtB8n1OSPaP9jhJs24BzZgSJpVLAR XmNjbQexEgvoYG+JzeSouw== X-Received: by 10.28.54.206 with SMTP id y75mr849217wmh.72.1496132544426; Tue, 30 May 2017 01:22:24 -0700 (PDT) Received: from localhost ([2.26.27.176]) by smtp.gmail.com with ESMTPSA id o49sm8710328wrb.47.2017.05.30.01.22.23 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 30 May 2017 01:22:23 -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> Date: Tue, 30 May 2017 08:33:00 -0000 In-Reply-To: <87efvezmdl.fsf@linaro.org> (Richard Sandiford's message of "Wed, 24 May 2017 09:31:50 +0100") Message-ID: <87poeqoitd.fsf@linaro.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2017-05/txt/msg02239.txt.bz2 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);