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 middle-end/113734] [14 regression] libarchive miscompiled (fails libarchive_test_read_format_rar5_extra_field_version test) since r14-8768-g85094e2aa6dba7
Date: Wed, 07 Feb 2024 08:19:20 +0000	[thread overview]
Message-ID: <bug-113734-4-m5nLbihEON@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-113734-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Tamar Christina from comment #6)
> The reason for the miscompile popping up is this change from the previous
> patch
> 
> diff --git a/gcc/tree-vect-data-refs.cc b/gcc/tree-vect-data-refs.cc
> index 109d4ce5192..df3eab2e8d5 100644
> --- a/gcc/tree-vect-data-refs.cc
> +++ b/gcc/tree-vect-data-refs.cc
> @@ -725,8 +725,7 @@ vect_analyze_early_break_dependences (loop_vec_info
> loop_vinfo)
>              bounded by VF so accesses are within range.  We only need to
> check the
>              reads since writes are moved to a safe place where if we get
> there we
>              know they are safe to perform.  */
> -         if (DR_IS_READ (dr_ref)
> -             && !ref_within_array_bound (stmt, DR_REF (dr_ref)))
> +         if (!ref_within_array_bound (stmt, DR_REF (dr_ref)))
>             {
>               if (dump_enabled_p ())
>                 dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
> 
> but this should have bee safe, as the stores shouldn't be done until the
> point we know for sure they would be safe to do.
> 
> the code out of the vectorizer looks ok to me.  Valgrind is saying we're
> reading uninitialized values.  But those values I think come from a previous
> look which sets them to 0. Or is supposed to.  So working my way up this
> giant function.

Hmm, but there isn't really a "safe" place, is there?  If there's a safe
place then it would be safe for reads as well, no?

So I guess when you manage to massage the testcase to be based on decls
then you instead (with the above suggested change) get spurious stores?

  parent reply	other threads:[~2024-02-07  8:19 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-03  0:49 [Bug middle-end/113734] New: " sjames at gcc dot gnu.org
2024-02-03  8:20 ` [Bug middle-end/113734] " sjames at gcc dot gnu.org
2024-02-03 11:29 ` tnfchris at gcc dot gnu.org
2024-02-03 21:50 ` pinskia at gcc dot gnu.org
2024-02-05 12:19 ` tnfchris at gcc dot gnu.org
2024-02-05 14:46 ` sjames at gcc dot gnu.org
2024-02-06 17:53 ` tnfchris at gcc dot gnu.org
2024-02-07  8:19 ` rguenth at gcc dot gnu.org [this message]
2024-02-07  9:10 ` rguenth at gcc dot gnu.org
2024-02-07  9:21 ` rguenth at gcc dot gnu.org
2024-02-07  9:25 ` tnfchris at gcc dot gnu.org
2024-02-08 11:59 ` rguenth at gcc dot gnu.org
2024-02-10 14:51 ` sjames at gcc dot gnu.org
2024-02-11 13:49 ` sjames at gcc dot gnu.org
2024-02-12  5:43 ` sjames at gcc dot gnu.org
2024-02-12  9:06 ` tnfchris at gcc dot gnu.org
2024-02-12  9:56 ` sjames at gcc dot gnu.org
2024-02-12  9:58 ` tnfchris at gcc dot gnu.org
2024-02-12 10:34 ` tnfchris at gcc dot gnu.org
2024-02-12 11:47 ` tnfchris at gcc dot gnu.org
2024-02-12 13:16 ` tnfchris at gcc dot gnu.org
2024-02-12 13:25 ` rguenth at gcc dot gnu.org
2024-02-12 13:33 ` tnfchris at gcc dot gnu.org
2024-02-12 16:07 ` tnfchris at gcc dot gnu.org
2024-02-13  4:33 ` tnfchris at gcc dot gnu.org
2024-02-13  8:24 ` [Bug tree-optimization/113734] " tnfchris at gcc dot gnu.org
2024-02-13  8:42 ` jakub at gcc dot gnu.org
2024-02-13  8:49 ` sjames at gcc dot gnu.org
2024-02-13 11:05 ` cvs-commit at gcc dot gnu.org
2024-02-13 11:06 ` tnfchris 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-113734-4-m5nLbihEON@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).