From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9FBB33857719; Thu, 23 Nov 2023 06:02:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9FBB33857719 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1700719333; bh=vebqybYr7SJ3Vfiytji98Xnn646+oRcmqTl2m9zMrnY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=j6EmNBgQjr39JWFZBFXhRo3xU7e62Kk6oWVwvxKvzpoWTH85CBiUoF4Sj123MHu7O CUOLcfv58vOOzzUF1OE3eE2LEZ89cHKN4DgN0XIiT+nm7a9Llj61bXdDWzOZ/WDD1S ISh2FmCU2hgODHtdymDtR5mTMkenqnu7axZcboZM= From: "pan2.li at intel dot com" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: testsuite-fail X-Bugzilla-Severity: normal X-Bugzilla-Who: pan2.li at intel dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D112598 --- Comment #8 from Li Pan --- 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 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 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) <=3D=3D Load 1017e: 5e00b0d7 vmv.v.i v1,1 10182: 74d1a423 sw a3,1864(gp) # 13398 10186: 0207e0a7 vse32.v v1,(a5) <=3D=3D Sto= re 1018a: 03271163 bne a4,s2,101ac 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 o= f a4 is unexpected here.=