From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 53287 invoked by alias); 15 May 2018 11:12:21 -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 52797 invoked by uid 89); 15 May 2018 11:12:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-13.3 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-yb0-f193.google.com Received: from mail-yb0-f193.google.com (HELO mail-yb0-f193.google.com) (209.85.213.193) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 15 May 2018 11:12:13 +0000 Received: by mail-yb0-f193.google.com with SMTP id y5-v6so5199324ybg.0 for ; Tue, 15 May 2018 04:12:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=4cnnZKUx01HcXESJJObo8CHI/QBBgcTQCMLrNPKxVhU=; b=o3KzwBOSROSxfk1MJghafx45QOHLxVxNqrDylQaLwMGWJLNl5FNayT66LgXO2JI0Ir ZYkHHHbGuyMMg/jOYLtSbp/Wj8CoSaJ9+e1aC7P9xn67IaO1QRYX4MHwY6MPX6kHamU0 8fEYElAkB3FcScb3wabxm63OIs0kqBl6XetRQ+4g0455s2mOHEQVdx9j0+atnNpyKAWl W5He8jwPX3A3s7S4+hqm/EutECzTqNnpAvA2ozOXKh30SVNlVbevm4qYQ+Z4IAyz9STl 78RgWlbZEbfMSZEP0kcCsEGQe2VwFGtqxdzUDqOeXId9P1ll+oOcGMr8MB9UyO6T0XQA OaYw== X-Gm-Message-State: ALKqPwe2xYW11ttFdlbnSPh9DYD3jz5eGSlbFIqqs8Hmopv8rRytyqpQ D4owMCzfnBZr1afvMO7szcxZQw== X-Google-Smtp-Source: AB8JxZoIIDck/exZ56NtaO1yBJR9BH+d8mjZhf5P9WJvDSUgNLL1f0aFWvthQyX6qEKmsR4WRyPUAw== X-Received: by 2002:a25:2653:: with SMTP id m80-v6mr8296880ybm.22.1526382732045; Tue, 15 May 2018 04:12:12 -0700 (PDT) Received: from [192.168.1.15] (c-69-243-238-236.hsd1.al.comcast.net. [69.243.238.236]) by smtp.gmail.com with ESMTPSA id y127-v6sm4710732ywc.71.2018.05.15.04.12.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 May 2018 04:12:11 -0700 (PDT) Subject: Re: [PATCH 1/2] Introduce prefetch-minimum stride option To: Kyrill Tkachov , gcc-patches@gcc.gnu.org Cc: james.greenhalgh@arm.com, Richard.Earnshaw@arm.com, "H.J. Lu" , Jeff Law References: <1516628770-25036-1-git-send-email-luis.machado@linaro.org> <1516628770-25036-2-git-send-email-luis.machado@linaro.org> <468c1099-3a87-6e95-53c4-3ba62fe3472f@linaro.org> <5AFAAA57.2080501@foss.arm.com> From: Luis Machado Message-ID: <3b4ec84e-5902-f7de-f047-282c3b3fff08@linaro.org> Date: Tue, 15 May 2018 11:21:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <5AFAAA57.2080501@foss.arm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2018-05/txt/msg00670.txt.bz2 Hi, On 05/15/2018 06:37 AM, Kyrill Tkachov wrote: > Hi Luis, > > On 14/05/18 22:18, Luis Machado wrote: >> Hi, >> >> Here's an updated version of the patch (now reverted) that addresses >> the previous bootstrap problem (signedness and long long/int conversion). >> >> I've checked that it bootstraps properly on both aarch64-linux and >> x86_64-linux and that tests look sane. >> >> James, would you please give this one a try to see if you can still >> reproduce PR85682? I couldn't reproduce it in multiple attempts. >> > > The patch doesn't hit the regressions in PR85682 from what I can see. > I have a comment on the patch below. > Great. Thanks for checking Kyrill. > --- a/gcc/tree-ssa-loop-prefetch.c > +++ b/gcc/tree-ssa-loop-prefetch.c > @@ -992,6 +992,23 @@ prune_by_reuse (struct mem_ref_group *groups) >  static bool >  should_issue_prefetch_p (struct mem_ref *ref) >  { > +  /* Some processors may have a hardware prefetcher that may conflict with > +     prefetch hints for a range of strides.  Make sure we don't issue > +     prefetches for such cases if the stride is within this particular > +     range.  */ > +  if (cst_and_fits_in_hwi (ref->group->step) > +      && abs_hwi (int_cst_value (ref->group->step)) < > +      (HOST_WIDE_INT) PREFETCH_MINIMUM_STRIDE) > +    { > > The '<' should go on the line below together with PREFETCH_MINIMUM_STRIDE. I've fixed this locally now.