public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "juzhe.zhong at rivai dot ai" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/113431] [14] RISC-V rv64gcv vector: Runtime mismatch at -O3
Date: Wed, 17 Jan 2024 01:56:12 +0000	[thread overview]
Message-ID: <bug-113431-4-CqRhbI72k0@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-113431-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #8 from JuzheZhong <juzhe.zhong at rivai dot ai> ---
(In reply to Patrick O'Neill from comment #7)
> (In reply to JuzheZhong from comment #6)
> > (In reply to Patrick O'Neill from comment #5)
> > > (In reply to JuzheZhong from comment #4)
> > > > a[0][1] seems to be undefined value.
> > > 
> > > a is a global variable so the elements are initialized to 0. a[0][1] is
> > > within the bounds a[2][9].
> > 
> > Yes, I believe a[0][1] is 0. Then for all a[b][e] == a[0][1] == 0 should
> > always be
> > 1. 
> > 
> > Then if (!a[1][1]) should be false and then return 1;
> > 
> > I failed to see anything wrong here.
> 
> The value inside a[0][1] changes during the for loop. It starts out as 0 but
> is changed to 1 when b=0,e=1. The elements in a after b=0,e=1 should be 1.
> 
> Since a[1][1] is set after b=0,e=1 it should evaluate a[0][1]==0 to false
> and set a[1][1] to 0.

So I doubt it is not RISC-V backend issue. It's middle-end loop vectorizer
issue.
It's vectorized with evaluating whether it is 0 or not.

Let's wait for Andrew confirm it.

  parent reply	other threads:[~2024-01-17  1:56 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-16 21:45 [Bug target/113431] New: " patrick at rivosinc dot com
2024-01-16 21:46 ` [Bug target/113431] " patrick at rivosinc dot com
2024-01-16 22:37 ` juzhe.zhong at rivai dot ai
2024-01-16 22:57 ` patrick at rivosinc dot com
2024-01-17  1:38 ` juzhe.zhong at rivai dot ai
2024-01-17  1:42 ` patrick at rivosinc dot com
2024-01-17  1:44 ` juzhe.zhong at rivai dot ai
2024-01-17  1:53 ` patrick at rivosinc dot com
2024-01-17  1:56 ` juzhe.zhong at rivai dot ai [this message]
2024-01-17  3:33 ` [Bug tree-optimization/113431] [14 Regression] Wrong code " pinskia at gcc dot gnu.org
2024-01-17  8:08 ` rguenth at gcc dot gnu.org
2024-01-17  8:31 ` juzhe.zhong at rivai dot ai
2024-01-17  8:48 ` rguenth at gcc dot gnu.org
2024-01-17 12:34 ` rguenth at gcc dot gnu.org
2024-01-17 12:59 ` rguenth at gcc dot gnu.org
2024-01-18  7:37 ` cvs-commit at gcc dot gnu.org
2024-01-18  7:39 ` rguenth at gcc dot gnu.org
2024-01-19  8:55 ` ro at gcc dot gnu.org
2024-01-19  8:56 ` ro at gcc dot gnu.org
2024-02-28 14:55 ` ro at gcc dot gnu.org
2024-03-15 14:06 ` jakub at gcc dot gnu.org
2024-03-15 15:42 ` rguenth at gcc dot gnu.org
2024-03-15 15:52 ` cvs-commit at gcc dot gnu.org
2024-03-15 15:53 ` jakub at gcc dot gnu.org
2024-03-19  9:44 ` ro at CeBiTec dot Uni-Bielefeld.DE

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-113431-4-CqRhbI72k0@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).