From patchwork Fri Sep 22 17:05:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 114063 Delivered-To: patch@linaro.org Received: by 10.80.163.150 with SMTP id s22csp3300560edb; Fri, 22 Sep 2017 10:05:31 -0700 (PDT) X-Received: by 10.99.121.77 with SMTP id u74mr10033626pgc.81.1506099931203; Fri, 22 Sep 2017 10:05:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506099931; cv=none; d=google.com; s=arc-20160816; b=pZhFRIcwZzKmsSaMTYoRMlM9cLp+br69L36t5tnGWMQKFDmWjKNCLjANCUyS+FPOEZ qvPYJ2/8n0ByULftVNMLvECxpwUhd4I7vk1YKA17QwFGN8X2nWOP0WFO1+TmmNHfMLLX CRBAXRVoI6r9aGcLIzq8n5yvJzW7Myn8msAMfB5Au9NAZfVav3KXmyb2w7pqmgmXIAaX jqMoY8UUn27J0QpmYtAULLmWJGiJfYXMzj75bfxjlePT5i7gwvaNCS/48V5EusMuhvfO aLRpkwRUNhbSFholq3R6iviym2xvZJ2LIFPuHfeSE31aeZHa1fUKTWAyFxiHczTDBgTI Wfvw== 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=p+4cmAT9qg2tfGgSBIaWW6bmkwZmLs2TGywAhlWO3h8=; b=ZWgBhu8KCztK/CKsABPXHi1kOySSuNVmtr4q8mN359O+vwTMflBMBu/sdksSCVwYXI L+86sVx8Ux7w1NxMQvFsu7bj35YAsAcj0JpvCtjhE/ra3r16qtOsbTTphRUWR4Z1dHns OAYtqpJtQpw6SqyZLxIirbafmL5vIt4k4WoR7N5jp5+r2pUA0YsRjYtll/IyVUc9f/Eh K+lioedeRm7HMpc8p7zCPdZQFDHNf0PRJsmDULbEwf/h7bZ6jiiXsgR+vZDnduWXSa4Z 6R9zB6CroOUVWv4E6h9YOe0rFJpBr8OZg0AaSgoqiGJvvmaYwLOU6PgTNfZfIpgu8xoc SU+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=UF1F3dtX; spf=pass (google.com: domain of gcc-patches-return-462797-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-462797-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 r83si127813pfb.602.2017.09.22.10.05.30 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Sep 2017 10:05:31 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-462797-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=UF1F3dtX; spf=pass (google.com: domain of gcc-patches-return-462797-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-462797-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=DYvD6J1G7nI2f/UMibVh6pNfBabLTmraMiRH+kh7FdcE8+PYMZp2S msw84vXzgh0PVJ1QM0UFa/6Y1qWvaNJ0nEDrCsMLH++5F8EbUtZvEj0y49kP3K9E gS9Ml9XRlRiFQmAcbjJi3B0dYnj8J8/Vgy4Zh4lWTjkEGBjZyEbG1U= 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=Sl0h4j8Ej7jeD9uVitoOk8Ar3Mg=; b=UF1F3dtX/mz5thm7W0VB gAfVlHI89mxD+4BR3fmtHHNDbRaIrA+qzkeR2IFdInHQ8QodJ4UBTfynvaW3hkR3 rj3UIEYXeUbj8wCz9pg5CvKh18Oza5QHpQk02Jh3SriKeq/5xcz3XHSXJslWPnKj g09EvktGr09bXGTMGXBNuxw= Received: (qmail 75385 invoked by alias); 22 Sep 2017 17:05:16 -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 75374 invoked by uid 89); 22 Sep 2017 17:05:16 -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, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1659 X-HELO: mail-wm0-f52.google.com Received: from mail-wm0-f52.google.com (HELO mail-wm0-f52.google.com) (74.125.82.52) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 22 Sep 2017 17:05:14 +0000 Received: by mail-wm0-f52.google.com with SMTP id m127so5660445wmm.3 for ; Fri, 22 Sep 2017 10:05:14 -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=p+4cmAT9qg2tfGgSBIaWW6bmkwZmLs2TGywAhlWO3h8=; b=M4bi8mkhbxdl2/5oD0Svtg/PjS8dnzYPQZvvyxoDsv/yNtHGRnD33OSkjnhij2Sk8g mMxp6uNC1AV38Jx4cbZoWJ8Jc8x2SS/RiC8ponKLaanFbXIEEJwOyZE5Qc7U9ZchXu5p mP20i0xS/KzV5m9mdfvaMNXHwFZ6fyaQWYds8fv4P5N0arOai++ugiadWiJhpnQSKg8v dIpebQdNLtik+vjJ3HK7a3HlPc7O1hI7XSukxVtKy7BkEDVxig879MOoA16cMc92IWw0 fznIbf/ggfk9dq0wR9DesAXD6RQP8V6idsN8KM/FvC5tAnTuxDvA2vxVn134RBfULw7r Mfzw== X-Gm-Message-State: AHPjjUiXc69xqlBs4rqse4WInFVRo/InfYinNf3jc3fFAf07alryb2aN U+38q2tM317h+uusH9Asq0cgeCnXPKk= X-Google-Smtp-Source: AOwi7QARQ0L2WJ/Mwf0YA+VHSdaEoQi5XLCrtBMtMw5CKXpzBGkgxh5prVX5cZwEYxBllk8UxaiX9w== X-Received: by 10.28.31.140 with SMTP id f134mr3995412wmf.81.1506099912308; Fri, 22 Sep 2017 10:05:12 -0700 (PDT) Received: from localhost (94.197.121.89.threembb.co.uk. [94.197.121.89]) by smtp.gmail.com with ESMTPSA id 25sm377786wrv.8.2017.09.22.10.05.10 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 22 Sep 2017 10:05:11 -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] PR82289: Computing peeling costs for irrelevant drs Date: Fri, 22 Sep 2017 18:05:09 +0100 Message-ID: <87poaipsu2.fsf@linaro.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 This PR shows that we weren't filtering out irrelevant stmts in vect_get_peeling_costs_all_drs (unlike related loops in which we iterate over all datarefs). Tested on aarch64-linux-gnu, x86_64-linux-gnu and powerpc64le-linux-gnu. Installed as obvious. Richard 2017-09-22 Richard Sandiford gcc/ PR tree-optimization/82289 * tree-vect-data-refs.c (vect_get_peeling_costs_all_drs): Check STMT_VINFO_RELEVANT_P. gcc/testsuite/ PR tree-optimization/82289 * gcc.dg/vect/pr82289.c: New test. Index: gcc/tree-vect-data-refs.c =================================================================== --- gcc/tree-vect-data-refs.c 2017-09-22 17:44:23.043135080 +0100 +++ gcc/tree-vect-data-refs.c 2017-09-22 17:50:04.801574308 +0100 @@ -1326,6 +1326,9 @@ vect_get_peeling_costs_all_drs (vec 0) + { + d = j; + return; + } + if (!h) + while (g) + ; + while (h < 1) + if (a) + { + fn1 (&h); + h = 0; + } + f[e] = &c; + } + while (1) + ; +}