From patchwork Mon Oct 23 09:32:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 116653 Delivered-To: patch@linaro.org Received: by 10.80.245.45 with SMTP id t42csp2650499edm; Mon, 23 Oct 2017 02:33:10 -0700 (PDT) X-Received: by 10.84.136.135 with SMTP id 7mr9840546pll.375.1508751190843; Mon, 23 Oct 2017 02:33:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508751190; cv=none; d=google.com; s=arc-20160816; b=twvRN9JVmJqf9NNBeVqYx7ZqtLL/kPkQZ8lg0L+0RSU2JPDxcGKZgga8bs7UckFVEa IFHolsA0KREnr8aFNsgoUTAid5wE+rXo/DfHUGpcIplhk44HExXQBNctGOsZ+Nsvsgtt DBDzJa7qjs0CA5fkAk3i1xHVtrgXDDlQZTJY4S18ESznJPOzCs8ZTfSNCNXVL6cACUwM MQyaFKlE5IL40I1Kl59f9sMYbKr+3E3pmy4R0nk1EGKkoLcQH+Q2c9wMBUuPK2LOCIDV E/hV7olwq206wmEqCNi3+JI/W0N61LVjlcWZcIeIoU/cEPepTuVQ0ZvJJtMSttdMRDom uOQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:user-agent:message-id:date: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=I3yux789LZVwscKkkrf6N4TBR/xorWkdpIFAJtJjpbw=; b=wryNmH/U25Br3watBGg3FqmjrcL9eaL+z6HLaui6t1trTpI7JV7gKbfhjYWVWWPpR8 nAhpBkqLCPCP2AVPOagJK43/7oFtSAFWq4awEqyN3dreLzgyQ9I/Et6eqGDVv1HEI2C1 CeFP+z5oaTNDu62XxCIGT4ZdseDQRFU5UkhUeETfnG4FbxHBzUlb70nNVV4Y1dZRfqJI q4ghxFNEbQCWJiKl5NpcUkIhMbnM6QddwxthAl1w2lUqmDOEuwoYpmzbqEhlzhkR+xHY U/K6zsYKea9XK5vTcUXJbNYO1Xe4AhP8yL1EpizewA+wfaFMX6DMCJZWmsvLr8Gdonb3 0vIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=N0BsXs2r; spf=pass (google.com: domain of gcc-patches-return-464701-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-464701-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 n189si5059151pfn.422.2017.10.23.02.33.10 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Oct 2017 02:33:10 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-464701-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.s=default header.b=N0BsXs2r; spf=pass (google.com: domain of gcc-patches-return-464701-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-464701-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:date:message-id:mime-version:content-type; q=dns; s= default; b=bitl9xgE/Z5imyLGxvilQUR8dn/d65T82rWprBzPtBCfkAB7GDGOb Mz4yoDfk92603OIB+QamDfDE5I5JvmLjikQOkvRZUGlNfgcCm/wXLW1dHM1e0qM6 hj50mH/7q19Vk6NMup60lPhZ6FHd/1mo43isr9mz0LQzqnyutp3t3s= 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:date:message-id:mime-version:content-type; s= default; bh=9mMGUrRxfs4gbRLNFffnmOFC5A4=; b=N0BsXs2rWRbOwqjARDrG PRBVdpozRdkPAyBD6UMOvDKbe8PyRgD1KDZ5JogdM4CMMBa4zOnuWYz3QlfV0bjK FRFeoPQp0mTZZ5Bc6pbT2hJam8O23k/e2JmumBxFyI6OaZw12Fz32NMjc1UfoEeL ISDFy+jAldBGKYHxAWITr1k= Received: (qmail 80424 invoked by alias); 23 Oct 2017 09:32:57 -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 80394 invoked by uid 89); 23 Oct 2017 09:32:55 -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, SPF_PASS autolearn=ham version=3.3.2 spammy=Applied, HX-Received:Mon X-HELO: mail-wr0-f181.google.com Received: from mail-wr0-f181.google.com (HELO mail-wr0-f181.google.com) (209.85.128.181) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 23 Oct 2017 09:32:54 +0000 Received: by mail-wr0-f181.google.com with SMTP id p96so2747128wrb.7 for ; Mon, 23 Oct 2017 02:32:53 -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:date:message-id :user-agent:mime-version; bh=I3yux789LZVwscKkkrf6N4TBR/xorWkdpIFAJtJjpbw=; b=a7bntkTsx64f/o3Ss+7FOhv+NiWPtQeK6//h8ONuUgScFq0xBAxU29sqoguShRCXpC oOfLfi2seO1XUDxWwzKgGB9wq1t7Lod6DG+as7sqiRUuRbsugAkInD1zeVMzJAA2fjhA lY2HiPRgL2obiWd32Rw0FO/imEadbEepXyoLXs4s29SOujz8kYhGyY+nrQ0G5oHn8O+4 LiyHGvhd+qP9m64eBc5z2eh+IdtmsvGuC/DjO4SmYRu3ig1TGA0zNrTtF6IaoPMoIhc1 L9oTGGXS9EtRsBhij1FcqRsH9ULcKp4YmeuG+KII9kDa0BkYruHuPKeXO9dHSJ9xhI4S IEfA== X-Gm-Message-State: AMCzsaUmZrukTt4D4tR9IV1vFuFtwSr5DkS+NL6b+WG1RR7zG3drNsts Z/TQCvf4U/k687dBagKiYcFnTWtBIAE= X-Google-Smtp-Source: ABhQp+QtZNBLBw805ZxEauSATAqBV0Lj8YUA8Lxt56TEU0hWylLG+BjeS+JYSZY7iU7nFF0mfqfuyw== X-Received: by 10.223.157.141 with SMTP id p13mr11294851wre.92.1508751171763; Mon, 23 Oct 2017 02:32:51 -0700 (PDT) Received: from localhost ([2.26.27.199]) by smtp.gmail.com with ESMTPSA id y144sm3091073wmd.18.2017.10.23.02.32.50 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Oct 2017 02:32:50 -0700 (PDT) From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, richard.sandiford@linaro.org Subject: [committed] Use scalar_mode in expand_shift_1 Date: Mon, 23 Oct 2017 10:32:48 +0100 Message-ID: <87po9eyzsv.fsf@linaro.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Since this function handles scalar and vector shifts: machine_mode scalar_mode = mode; if (VECTOR_MODE_P (mode)) scalar_mode = GET_MODE_INNER (mode); is equivalent to: scalar_mode = GET_MODE_INNER (mode); Tested on aarch64-linux-gnu, x86_64-linux-gnu and powerpc64le-linux-gnu. Applied as obvious. Richard 2017-10-23 Richard Sandiford Alan Hayward David Sherwood gcc/ * expmed.c (expand_shift_1): Use scalar_mode for scalar_mode. Index: gcc/expmed.c =================================================================== --- gcc/expmed.c 2017-09-23 10:27:39.925846365 +0100 +++ gcc/expmed.c 2017-10-23 10:30:47.246081163 +0100 @@ -2337,12 +2337,10 @@ expand_shift_1 (enum tree_code code, mac optab lrotate_optab = rotl_optab; optab rrotate_optab = rotr_optab; machine_mode op1_mode; - machine_mode scalar_mode = mode; + scalar_mode scalar_mode = GET_MODE_INNER (mode); int attempt; bool speed = optimize_insn_for_speed_p (); - if (VECTOR_MODE_P (mode)) - scalar_mode = GET_MODE_INNER (mode); op1 = amount; op1_mode = GET_MODE (op1);