public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pan2.li at intel dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/112598] RISC-V regression testsuite errors with rv64gcv_zvl512b
Date: Thu, 23 Nov 2023 06:02:11 +0000	[thread overview]
Message-ID: <bug-112598-4-bK6LkMVpfi@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-112598-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #8 from Li Pan <pan2.li at intel dot com> ---
For gcc.dg/torture/pr58955-2.c, we can simply reproduce it by options

Pass when: -O3
Pass when: -O3 -ftracer -fno-schedule-insns -fno-schedule-insns2
Fail when: -O3 -ftracer -fno-schedule-insns2

   10154:       4409           li       s0,2
   10156:       9c1d           subw     s0,s0,a5
   10158:       1402           sll      s0,s0,0x20
   1015a:       9001           srl      s0,s0,0x20
   1015c:       97ca           add      a5,a5,s2
   1015e:       078a           sll      a5,a5,0x2
   10160:       7b018493       add      s1,gp,1968 # 13400 <b>
   10164:       97a6           add      a5,a5,s1
   10166:       00241613       sll      a2,s0,0x2
   1016a:       853e           mv       a0,a5
   1016c:       4581           li       a1,0
   1016e:       158000ef       jal      102c6 <memset>
   10172:       ffc50793       add      a5,a0,-4
   10176:       4689           li       a3,2
   10178:       0d047057       vsetvli  zero,s0,e32,m1,ta,ma
   1017c:       40d8           lw       a4,4(s1)                <== Load
   1017e:       5e00b0d7       vmv.v.i  v1,1
   10182:       74d1a423       sw       a3,1864(gp) # 13398 <a>
   10186:       0207e0a7       vse32.v  v1,(a5)                 <== Store
   1018a:       03271163       bne      a4,s2,101ac <main+0x6e>

Looks like the tracer and the sch1 resulted in the failure, it is a typical
Load Before Store issue AFAIK. The lw load should be after the vse32 store in
semantics but the sch1 moves it before the store and of course, the value of a4
is unexpected here.

  parent reply	other threads:[~2023-11-23  6:02 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-17 21:18 [Bug target/112598] New: " patrick at rivosinc dot com
2023-11-17 21:21 ` [Bug target/112598] " patrick at rivosinc dot com
2023-11-21  2:43 ` juzhe.zhong at rivai dot ai
2023-11-21 13:38 ` cvs-commit at gcc dot gnu.org
2023-11-21 17:43 ` patrick at rivosinc dot com
2023-11-22  6:45 ` cvs-commit at gcc dot gnu.org
2023-11-22 11:09 ` juzhe.zhong at rivai dot ai
2023-11-22 12:31 ` cvs-commit at gcc dot gnu.org
2023-11-23  6:02 ` pan2.li at intel dot com [this message]
2023-11-24  2:37 ` pan2.li at intel dot com
2023-11-27  3:07 ` pan2.li at intel dot com
2023-11-27  8:15 ` rdapp at gcc dot gnu.org
2023-11-27  8:25 ` pan2.li at intel dot com
2023-11-27  8:43 ` rdapp at gcc dot gnu.org
2023-11-27 11:37 ` pan2.li at intel dot com
2023-11-27 12:42 ` rdapp at gcc dot gnu.org
2023-11-27 17:51 ` patrick at rivosinc dot com
2023-11-28  3:15 ` pan2.li at intel dot com
2023-12-04 21:35 ` patrick at rivosinc dot com
2023-12-11 23:48 ` patrick at rivosinc dot com
2024-01-24 23:53 ` 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-112598-4-bK6LkMVpfi@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).