public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/115120] Bad interaction between ivcanon and early break vectorization
Date: Tue, 25 Jun 2024 12:46:23 +0000 [thread overview]
Message-ID: <bug-115120-4-1frE7ZDYVu@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-115120-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115120
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Tamar Christina from comment #5)
> considering ivopts bails out on doloop prediction for multiple exits anyway,
> what do you think about:
>
> diff --git a/gcc/tree-ssa-loop-ivcanon.cc b/gcc/tree-ssa-loop-ivcanon.cc
> index 5ef24a91917..d1b25ad7dea 100644
> --- a/gcc/tree-ssa-loop-ivcanon.cc
> +++ b/gcc/tree-ssa-loop-ivcanon.cc
> @@ -1319,7 +1319,8 @@ canonicalize_loop_induction_variables (class loop
> *loop,
>
> if (create_iv
> && niter && !chrec_contains_undetermined (niter)
> - && exit && just_once_each_iteration_p (loop, exit->src))
> + && exit && just_once_each_iteration_p (loop, exit->src)
> + && (single_dom_exit (loop) || targetm.predict_doloop_p (loop)))
> {
> tree iv_niter = niter;
> if (may_be_zero)
>
> richi?
I think while IVOPTs might not care, loop-doloop.cc handles multiple exists
just fine I think.
What about moving iv_canon towards iv_optimize? Ideally it would be
integrated with IVOPTs itself, but that can be done later. In particular
I wonder which other passes might depend on iv_canon being run early
(yeah, it also elides single-iteration loops, so maybe you need to "split"
it)
prev parent reply other threads:[~2024-06-25 12:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-16 16:03 [Bug tree-optimization/115120] New: " acoplan at gcc dot gnu.org
2024-05-17 6:45 ` [Bug tree-optimization/115120] " rguenth at gcc dot gnu.org
2024-05-17 6:46 ` rguenth at gcc dot gnu.org
2024-05-17 7:47 ` tnfchris at gcc dot gnu.org
2024-06-24 18:09 ` tnfchris at gcc dot gnu.org
2024-06-25 7:03 ` tnfchris at gcc dot gnu.org
2024-06-25 12:46 ` rguenth at gcc dot gnu.org [this message]
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=bug-115120-4-1frE7ZDYVu@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@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).