public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "tnfchris at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/113467] [14 regression] libgcrypt-1.10.3 is miscompiled
Date: Tue, 23 Jan 2024 17:47:32 +0000	[thread overview]
Message-ID: <bug-113467-4-xbAJ1OujgN@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-113467-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113467

--- Comment #20 from Tamar Christina <tnfchris at gcc dot gnu.org> ---
(In reply to rguenther@suse.de from comment #19)
> > Am 23.01.2024 um 18:06 schrieb tnfchris at gcc dot gnu.org <gcc-bugzilla@gcc.gnu.org>:
> > 
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113467
> > 
> > --- Comment #18 from Tamar Christina <tnfchris at gcc dot gnu.org> ---
> > (In reply to Richard Biener from comment #7)
> >> I do wonder whether LOOP_VINFO_EARLY_BREAKS_VECT_PEELED actually works (since
> >> without early exits we cannot handle a non-empty latch because of correctness
> >> issues).  I'd very much have preferred to deal with these by loop rotation
> >> (there's the loop_ch pass).  We're still doing this, even when
> >> LOOP_VINFO_EARLY_BREAKS_VECT_PEELED:
> >> 
> >>  /* We assume that the loop exit condition is at the end of the loop. i.e,
> >>     that the loop is represented as a do-while (with a proper if-guard
> >>     before the loop if needed), where the loop header contains all the
> >>     executable statements, and the latch is empty.  */
> >>  if (!empty_block_p (loop->latch)
> >>      || !gimple_seq_empty_p (phi_nodes (loop->latch)))
> >>    return opt_result::failure_at (vect_location,
> >>                                   "not vectorized: latch block not
> >> empty.\n");
> >> 
> >> so that's a bit odd (but loop_ch tries to ensure the latch is empty anyway).
> >> 
> >> Does the following fix the issue?
> > 
> > Not really sure I understand what the latch being empty has to do with
> > LOOP_VINFO_EARLY_BREAKS_VECT_PEELED as the latch is still empty even with it.
> 
> The latch is everything after the IV exit.

Wait, are you saying, that conceptually if we pick an earlier exit as the main
exit then for the vectorizer the "latch" is everything below the fall through
edge?

i.e. that the "latch" then contains the normal loop exit?

> 
> > I guess if it's just going to disabled it then wouldn't it better to just
> > always pick the latch exit rather than trying to do the whole analysis thing
> > and maybe pick another exit while the main exit would have worked.
> 
> The point was to quickly see whether a peeled early exit vectorization is
> the issue here.

I see, I should submit that dbgcnt patch. I wrote it just never sent it.

  parent reply	other threads:[~2024-01-23 17:47 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-18  5:21 [Bug tree-optimization/113467] New: " sjames at gcc dot gnu.org
2024-01-18  5:22 ` [Bug tree-optimization/113467] " sjames at gcc dot gnu.org
2024-01-18  5:23 ` sjames at gcc dot gnu.org
2024-01-18  5:23 ` sjames at gcc dot gnu.org
2024-01-18  5:24 ` sjames at gcc dot gnu.org
2024-01-18  5:46 ` sjames at gcc dot gnu.org
2024-01-18  6:53 ` sjames at gcc dot gnu.org
2024-01-18  8:22 ` rguenth at gcc dot gnu.org
2024-01-18  8:49 ` rguenth at gcc dot gnu.org
2024-01-18  8:51 ` rguenth at gcc dot gnu.org
2024-01-18  9:32 ` sjames at gcc dot gnu.org
2024-01-18  9:35 ` sjames at gcc dot gnu.org
2024-01-18 13:16 ` rguenth at gcc dot gnu.org
2024-01-18 16:47 ` sjames at gcc dot gnu.org
2024-01-19  2:31 ` sjames at gcc dot gnu.org
2024-01-19  3:00 ` sjames at gcc dot gnu.org
2024-01-19  7:06 ` rguenth at gcc dot gnu.org
2024-01-19 11:36 ` jakub at gcc dot gnu.org
2024-01-19 13:37 ` rguenth at gcc dot gnu.org
2024-01-23 16:11 ` sjames at gcc dot gnu.org
2024-01-23 17:06 ` tnfchris at gcc dot gnu.org
2024-01-23 17:42 ` rguenther at suse dot de
2024-01-23 17:47 ` tnfchris at gcc dot gnu.org [this message]
2024-01-24  7:32 ` rguenth at gcc dot gnu.org
2024-01-26 13:28 ` rguenth at gcc dot gnu.org
2024-01-26 13:33 ` sjames at gcc dot gnu.org
2024-01-26 13:44 ` sjames at gcc dot gnu.org
2024-01-26 14:04 ` tnfchris at gcc dot gnu.org
2024-01-26 19:45 ` kacper.slominski72 at gmail dot com
2024-01-29 18:09 ` tnfchris at gcc dot gnu.org
2024-01-30  8:01 ` sjames at gcc dot gnu.org
2024-02-01 21:56 ` sjames at gcc dot gnu.org
2024-02-02 23:56 ` cvs-commit at gcc dot gnu.org
2024-02-03 22:03 ` sjames at gcc dot gnu.org
2024-02-07 10:57 ` cvs-commit at gcc dot gnu.org

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-113467-4-xbAJ1OujgN@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).