From patchwork Thu Jul 13 08:58:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 107642 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp1940035qge; Thu, 13 Jul 2017 02:00:17 -0700 (PDT) X-Received: by 10.84.169.3 with SMTP id g3mr8918651plb.136.1499936417726; Thu, 13 Jul 2017 02:00:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1499936417; cv=none; d=google.com; s=arc-20160816; b=04uwsNcRqYlYneOg2cNR0eXXrRNeK4PqEzAK2UsdCcvA9LkPk3cCOd/DS1/cSmhGTs 1RE+dPHBYcXWCg9D+G0cpnnm7AC76Gz9o8VR3coYVoI9+0ngpdAk2OBIiHwfBSY2pmP1 QAu9uqSas+2YfpBBlvvHcGxvaOsBGIq2WIbyMvmPa7YqQUNTVTP2miRkyrqa9HSQPYlN ++L1PejMnCZAOSpN/sV/n2EDmR22CB1o5YZuZjeMpxt+MurqT4aqp/s1C2D3XpP3fc52 ts9frz6utAq/OFSee3MMYcHNbDNIVzayxS4SBwZ8gV8uXBFZdvqLv6aUpJxvDTlwQ87+ 90QQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:mail-followup-to:to:from:delivered-to:sender:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :mailing-list:dkim-signature:domainkey-signature :arc-authentication-results; bh=iM6YUYf5cmIwbpQy/OEaX90gVi/soO48tu8J20cdabs=; b=R6ee2TtmyllvbHQTeI6+hGFf+TPwaJ9e6yeCghSkVIJ0/O3HCB0k1apFID4zrebCG2 FCgLKDt8KPzFh0oRPM8LLJpGTr5d+dKoDrwKE4uJRf9KVAxFUpRu3KBPwX7RXCMIYC6o Lq4yT4mwbYBPBEvclh0Lfe2+2tBXxBYVV3wCo1Llj7E+Wm9xS504EJVrsRExY9lai2pd jSkcBZT42veaBYw8rr7iIcozGcOTIIMYdv2ozt1+CdvH8JH2weRmjMwxZrMZE+KgJ9/q gd7Na6SkyL6N9m5fgbFs+w0+yAOIoDi6NY5lwu7HFeTmWUfdffsi8O8ESgdSTK13Dzhd xCgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.b=wbtiQ0N5; spf=pass (google.com: domain of gcc-patches-return-458047-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-458047-patch=linaro.org@gcc.gnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id v25si3832594pgo.576.2017.07.13.02.00.17 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Jul 2017 02:00:17 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-458047-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.b=wbtiQ0N5; spf=pass (google.com: domain of gcc-patches-return-458047-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-458047-patch=linaro.org@gcc.gnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=default; b=lHVdcuc4f4EKVIZf0Iab5+R59EalP ScIeCxLF+se/JyguIWBqC/tD9GPvg4InSiAiXHjZYfvzIqm2jpRJJfmLIgE1/sH0 rA7azWPGgRnor1/qDP6VLVW8+ilD2LcaUO1dAhABfgBMfTkP7pKZUc/7Xt5Q0RIn DhUzujFImnqunQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:references:date:in-reply-to:message-id:mime-version :content-type; s=default; bh=NE67gl4dDqP2RyjSsNW7thh4Qtk=; b=wbt iQ0N59N64WKrToV/oVMqq7iOy8t2v3Em4Az15ZgEZguDPvjMV0jXabpWnrGjZkqg xRbdP5m5aNSTDn7iQfdhMV9PIZOcxf9BaF7FoKeRozLbqLvRSUgunJcTRgaA3bic Z2+pwkx9Jhl0nNOHEhKF/CcpZ5FveHNrZTLVRCg8= Received: (qmail 2083 invoked by alias); 13 Jul 2017 08:58:38 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 1288 invoked by uid 89); 13 Jul 2017 08:58:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.4 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=htem X-HELO: mail-wr0-f182.google.com Received: from mail-wr0-f182.google.com (HELO mail-wr0-f182.google.com) (209.85.128.182) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 13 Jul 2017 08:58:35 +0000 Received: by mail-wr0-f182.google.com with SMTP id k67so49473029wrc.2 for ; Thu, 13 Jul 2017 01:58:34 -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=iM6YUYf5cmIwbpQy/OEaX90gVi/soO48tu8J20cdabs=; b=Q7i1nwQdjXyrrBn71reCaalZRnTTv/iuOL5TvI+3rfSXdQUyZSVeA0+mUtRJoWWEmm l5Orj+j403gA0qshmxMPKW22w0Wqs+o3hDqVXcJKoJejBEj50jGdPx5cfqWO4TRuBJy8 l2IM6OlgL6TWugn6GvlyOiEdJ5amWQ+sHyajGeCZeQyEIWZCbvn3JKg7OcPyAqLw5Hca sflnyzkYclWJPF/az3e0q8DJ/9W4XWJdpcwgVt1hDV/GtNmK2YoLf0T1kR80VW2bdpnR otkMWQJMI2diK2AoWnWfHLbbuaABzsw4UeFE5efUbL4bt/1iEEIoF8rhkkDzTmeQddgx V0YQ== X-Gm-Message-State: AIVw111RY0vwbOq9g3NPEKbqxJ2/2oNaeSJj9oynksR2OqzPNaZi93eN Td7hTxZ9aS4qymUR8wP4Ug== X-Received: by 10.223.183.40 with SMTP id l40mr1113081wre.154.1499936312920; Thu, 13 Jul 2017 01:58:32 -0700 (PDT) Received: from localhost (92.40.249.184.threembb.co.uk. [92.40.249.184]) by smtp.gmail.com with ESMTPSA id j190sm6172125wmd.22.2017.07.13.01.58.31 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 13 Jul 2017 01:58:32 -0700 (PDT) From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, richard.sandiford@linaro.org Subject: [56/77] Use the more specific type when two modes are known to be equal References: <8760ewohsv.fsf@linaro.org> Date: Thu, 13 Jul 2017 09:58:30 +0100 In-Reply-To: <8760ewohsv.fsf@linaro.org> (Richard Sandiford's message of "Thu, 13 Jul 2017 09:35:44 +0100") Message-ID: <87fue0emrt.fsf@linaro.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 This patch adjusts a couple of cases in which we had established that two modes were equal and happened to be using the one with the more general type instead of the one with the more specific type. 2017-07-13 Richard Sandiford Alan Hayward David Sherwood gcc/ * expr.c (expand_expr_real_2): Use word_mode instead of innermode when the two are known to be equal. Index: gcc/expr.c =================================================================== --- gcc/expr.c 2017-07-13 09:18:47.609081780 +0100 +++ gcc/expr.c 2017-07-13 09:18:48.752992795 +0100 @@ -8671,7 +8671,7 @@ #define REDUCE_BIT_FIELD(expr) (reduce_b rtx htem, hipart; op0 = expand_normal (treeop0); if (TREE_CODE (treeop1) == INTEGER_CST) - op1 = convert_modes (innermode, mode, + op1 = convert_modes (word_mode, mode, expand_normal (treeop1), TYPE_UNSIGNED (TREE_TYPE (treeop1))); else @@ -8682,8 +8682,8 @@ #define REDUCE_BIT_FIELD(expr) (reduce_b goto widen_mult_const; temp = expand_binop (mode, other_optab, op0, op1, target, unsignedp, OPTAB_LIB_WIDEN); - hipart = gen_highpart (innermode, temp); - htem = expand_mult_highpart_adjust (innermode, hipart, + hipart = gen_highpart (word_mode, temp); + htem = expand_mult_highpart_adjust (word_mode, hipart, op0, op1, hipart, zextend_p); if (htem != hipart)