From patchwork Wed Jan 3 21:41:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 123341 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp10672358qgn; Wed, 3 Jan 2018 13:41:50 -0800 (PST) X-Google-Smtp-Source: ACJfBouzT74O31swUMfbfo3bUzhFI/hmI1OBYLxnUKjYCkUtecJ86xL6QMnnfDIRqyzegUyKWB8+ X-Received: by 10.99.126.18 with SMTP id z18mr2290436pgc.192.1515015709926; Wed, 03 Jan 2018 13:41:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515015709; cv=none; d=google.com; s=arc-20160816; b=pGdkRNtK+r5FlSZVC9FWEUHzXmsJTtCvanF0sbMgNKL5F1NGB0C06glg7kIVlODEe3 ZmRJ1OTlEtHYUAKxBbjK5fvCcFCUe7o12iHPcdI/ZJlR8KLSAKSHmrDFltXLtNm7f0D+ aEb7mmCdGvfdLRhoQMGKN975PYoqpama7p8oRYcbZA5XgIT0VMtGyYEYxmv/kh6Zio39 ezSldhdPwp9xuk5hEW+W5sxX8xy6Egr9FvE6Kl64zhGpnz66ipl7l1xLMZ449PeoRtdZ xqbNgXiJmqNST5HNpENrVPV/9NwZhOEEfdpMYztyIJJcEqy0W5QHlqSUV9H3TifytHuM PLkw== 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=AB27PfAfKTbOOysXsBx0aWzxZJdK4EgUkCO/DNED1/w=; b=H9cpqn35WW3PFQVKnV40jd0cK7iSu/1g27OBrXWiF7Ui7Uh58lcXD60b/UTQgr0GsH NhhGzLHytUZX5VimHPB36ftaoOm6bt5PQtectxOpRuuhPwAXaiZnOmfE5/gsxwSSANa8 i2EqV3oL24zoCVDNeXz9LFg8mJ/NOhded7aEifHlap88FxFS0bx0cG6zjhubHwfIhaz1 gAm3cpWAgRIgVLDg4E5vWCbd4c3V/BKYEfB+mwKsfI0z0UI6oaIT8av0ObKwLedymaSM oOedOIAatdDPe+m8IzitEvpbWCRYKgLV9RW+ga4LSGZCpyqRb4p8+xr5T0jlCN6QyeBR xBkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=JCI8XXTM; spf=pass (google.com: domain of gcc-patches-return-470111-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-470111-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 i5si1256165plk.398.2018.01.03.13.41.49 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Jan 2018 13:41:49 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-470111-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=JCI8XXTM; spf=pass (google.com: domain of gcc-patches-return-470111-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-470111-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=r9ObBu+O9jw63hRGlJSR+ckZdyZdTGDvpW2tV6PrJXikk8YicuHgP 3F8vI1YPnIVhDYqKjA5HLa4WEyzzuwog6O7kcgk2LTh2PNvuohRt7JE06Fx49N5+ uvBI/+9VzurD0OxCz6E1SGiv0uZAbJ6UaJH3ACZpvCZFyXmyt49A7s= 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=Uey7d+FZ6Cu0Md4Bbwc/MmL91X4=; b=JCI8XXTMAsgfIcuRN9pa CN6wshAEqubwHOBIwTE5dvIZrzNCQfKszww2BT42HNNosZcrH2u2/1Wosjk4v0ZH Bq118ifYqmVxkO86jUATIFydDVexe2eaxb0RcRCB+sRRdAsQ/wwwEM8vY8k6N+mt 8s6hsC4cm1Rj5FnQ2cXjawM= Received: (qmail 22711 invoked by alias); 3 Jan 2018 21:41:37 -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 22694 invoked by uid 89); 3 Jan 2018 21:41:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-12.1 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= X-HELO: mail-wr0-f195.google.com Received: from mail-wr0-f195.google.com (HELO mail-wr0-f195.google.com) (209.85.128.195) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 03 Jan 2018 21:41:36 +0000 Received: by mail-wr0-f195.google.com with SMTP id y9so3200712wrb.5 for ; Wed, 03 Jan 2018 13:41:35 -0800 (PST) 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=AB27PfAfKTbOOysXsBx0aWzxZJdK4EgUkCO/DNED1/w=; b=d3nhQ8Mbfi4jETQy7AYe15HpnuZYwQpdiqHZS4rqtpUYIwmzRxhaBKMPOr90wIf+sj hvh7iZgwOiRUZ3Bz02bAkvfzrNMYkJyqn4DA13PxDfy4FR+FR0hsu4Ww4R7T6spoSzjA zgkbE+X+EQMR4O27y5XLct2zMca4Df7gWXIKjhiF0NvWnsEEUSMYAUxphdGfZx9+cKTJ WAJxln8brxjkqI/yfwTJuIRdL86QWEgLPpjq9I/aImnLSTz5cbRuOq+z2hNQNEsw/1nn 9m/pOhz/ZuDtzoE8xyGN2YFX3TvN7tEW+sDBDsycjo0qMzgTTAF6EhqqjC01ojyYvNaI lSXQ== X-Gm-Message-State: AKGB3mKOCFkkXqYzT+S8G+LXe6eORer1XtNuF/amU4Niy8wWIpIcBrR3 Nx0K959TRkSzpEgNz0XnPm9kBBugnMU= X-Received: by 10.223.159.18 with SMTP id l18mr2854928wrf.156.1515015693858; Wed, 03 Jan 2018 13:41:33 -0800 (PST) Received: from localhost ([95.144.14.233]) by smtp.gmail.com with ESMTPSA id y42sm3414480wrc.96.2018.01.03.13.41.32 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 03 Jan 2018 13:41:32 -0800 (PST) From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, richard.sandiford@linaro.org Subject: [committed] Use partial_subreg_p in curr_insn_transform Date: Wed, 03 Jan 2018 21:41:31 +0000 Message-ID: <871sj6k4c4.fsf@linaro.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Use partial_subreg_p in code that was added since the initial patch that introduced this function. Tested on aarch64-linux-gnu, x86_64-linux-gnu and powerpc64le-linux-gnu. Also tested by comparing the before and after assembly output for at least one target per CPU directory. Committed as obvious. Richard 2018-01-03 Richard Sandiford gcc/ * lra-constraints.c (curr_insn_transform): Use partial_subreg_p. Index: gcc/lra-constraints.c =================================================================== --- gcc/lra-constraints.c 2018-01-03 07:18:30.797822724 +0000 +++ gcc/lra-constraints.c 2018-01-03 09:34:11.747070247 +0000 @@ -4243,8 +4243,7 @@ curr_insn_transform (bool check_only_p) || (simplify_subreg_regno (ira_class_hard_regs[goal_alt[i]][0], GET_MODE (reg), byte, mode) >= 0))) - || (GET_MODE_PRECISION (mode) - < GET_MODE_PRECISION (GET_MODE (reg)) + || (partial_subreg_p (mode, GET_MODE (reg)) && GET_MODE_SIZE (GET_MODE (reg)) <= UNITS_PER_WORD && WORD_REGISTER_OPERATIONS))) {