public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jan Hubicka <hubicka@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc(refs/users/kubaneko/heads/histogram)] Fix use of estimates.
Date: Mon,  1 May 2023 22:19:10 +0000 (GMT)	[thread overview]
Message-ID: <20230501221910.042993858D1E@sourceware.org> (raw)

https://gcc.gnu.org/g:e3bc373e2bf65039a7f5f11a2b49a742ac1caa09

commit e3bc373e2bf65039a7f5f11a2b49a742ac1caa09
Author: Honza <jh@ryzen3.suse.cz>
Date:   Tue May 2 00:18:57 2023 +0200

    Fix use of estimates.

Diff:
---
 gcc/tree-vect-loop.cc | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc
index 140bafad28c..ba068af264c 100644
--- a/gcc/tree-vect-loop.cc
+++ b/gcc/tree-vect-loop.cc
@@ -2109,9 +2109,10 @@ vect_analyze_loop_costing (loop_vec_info loop_vinfo,
   if (LOOP_VINFO_EPILOGUE_P (loop_vinfo))
     estimated_niter
       = vect_vf_for_cost (LOOP_VINFO_ORIG_LOOP_INFO (loop_vinfo)) - 1;
-  else if (use_estimate)
+  else
     {
-      estimated_niter = estimated_stmt_executions_int (loop);
+      if (use_estimate)
+	estimated_niter = estimated_stmt_executions_int (loop);
       if (estimated_niter == -1)
 	estimated_niter = likely_max_stmt_executions_int (loop);
     }

                 reply	other threads:[~2023-05-01 22:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230501221910.042993858D1E@sourceware.org \
    --to=hubicka@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).