public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rdapp at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/113607] [14] RISC-V rv64gcv vector: Runtime mismatch at -O3
Date: Mon, 29 Jan 2024 16:30:16 +0000	[thread overview]
Message-ID: <bug-113607-4-Bb8eFHNUpr@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-113607-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #17 from Robin Dapp <rdapp at gcc dot gnu.org> ---
Grasping for straws by blaming qemu ;)

At some point we do the vector shift

        vsll.vv v1,v2,v2,v0.t

but the mask v0 is all zeros:
gdb:
   b = {0 <repeats 16 times>}

According to the mask-undisturbed policy set before
        vsetvli zero,zero,e32,mf2,ta,mu

all elements should be unchanged.  I'm seeing an all-zeros result in v1,
though.
v1 is used as 'j', is zero and therefore 'q' is not incremented and we don't
assign c = d causing the wrong result.

Before the shift I see v2 in gdb as:
  w = {4294967295, 4294967295, 0, 0}
(That's also a bit dubious because we load 2 elements from 'g' of which only
one should be -1.  This doesn't change the end result, though.)

After the shift gdb shows v1 as:
   w = {0, 0, 0, 0},

when it should be w = {-1, -1, 0, 0}.

Does this make sense?

  parent reply	other threads:[~2024-01-29 16:30 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-25 23:05 [Bug target/113607] New: " patrick at rivosinc dot com
2024-01-26  1:52 ` [Bug target/113607] " juzhe.zhong at rivai dot ai
2024-01-26  1:52 ` juzhe.zhong at rivai dot ai
2024-01-26  2:12 ` juzhe.zhong at rivai dot ai
2024-01-26  7:58 ` rdapp at gcc dot gnu.org
2024-01-26  8:05 ` patrick at rivosinc dot com
2024-01-26  8:12 ` patrick at rivosinc dot com
2024-01-26  8:14 ` rdapp at gcc dot gnu.org
2024-01-26  8:19 ` juzhe.zhong at rivai dot ai
2024-01-26  9:09 ` juzhe.zhong at rivai dot ai
2024-01-26  9:38 ` rdapp at gcc dot gnu.org
2024-01-26  9:42 ` juzhe.zhong at rivai dot ai
2024-01-26  9:42 ` pinskia at gcc dot gnu.org
2024-01-26  9:59 ` juzhe.zhong at rivai dot ai
2024-01-28  6:08 ` pinskia at gcc dot gnu.org
2024-01-29  3:27 ` juzhe.zhong at rivai dot ai
2024-01-29 12:29 ` rdapp at gcc dot gnu.org
2024-01-29 16:30 ` rdapp at gcc dot gnu.org [this message]
2024-01-29 19:50 ` rdapp at gcc dot gnu.org
2024-01-30 21:03 ` rdapp at gcc dot gnu.org
2024-01-30 22:12 ` juzhe.zhong at rivai dot ai
2024-01-30 22:14 ` pinskia at gcc dot gnu.org
2024-01-30 22:21 ` pinskia at gcc dot gnu.org
2024-01-31  8:28 ` rdapp at gcc dot gnu.org
2024-01-31 20:31 ` [Bug middle-end/113607] " cvs-commit at gcc dot gnu.org
2024-02-02 18:20 ` patrick at rivosinc dot com

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-113607-4-Bb8eFHNUpr@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).