From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C0E103858D1E; Thu, 9 Nov 2023 19:17:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C0E103858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1699557436; bh=c9tIWwowMi3Vu73cR1GM0o69npIV9ssEv3eODTnzAVg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=eIK8XysM/DOI+C3wz9IHbKIHxZLf930kLnKm2tdPcZVrCorkkrykqC9AXxwY+RLMB gHzIjZa4Crb6VxB+o1DLoEjcOIomhuBLVpRpFOXIahbdaBP0MBQT+NvCUY94WxOJqw YRZTZZClboOj9SK9p95l2WBu/TYmUXA4ifsok6I8= From: "danglin at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/112415] [14 regression] Python 3.11 miscompiled on HPPA with new RTL fold mem offset pass, since r14-4664-g04c9cf5c786b94 Date: Thu, 09 Nov 2023 19:17:16 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: danglin at gcc dot gnu.org 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: 14.0 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=3D112415 --- Comment #30 from John David Anglin --- 0x0019c684 <+588>: stw r23,0(r22) =3D> 0x0019c688 <+592>: stw ret1,0(r21) 0x0019c68c <+596>: stw r31,0(r20) 0x0019c690 <+600>: b,l 0x198d58 ,rp 0x0019c694 <+604>: stw ret0,0(r19) These instructions are in a loop: /* No * or ** args, so can use faster calling sequence */ for (i =3D 0; i < nelts; i++) { expr_ty elt =3D asdl_seq_GET(args, i); assert(elt->kind !=3D Starred_kind); VISIT(c, expr, elt); } r21 is clobbered by VISIT call. Value is okay in first iteration. The initialization instructions are outside the loop: 0x0019c638 <+512>: ldo 184(r19),r22 0x0019c63c <+516>: ldw 184(r19),r14 0x0019c640 <+520>: ldo 188(r19),r21 0x0019c644 <+524>: ldw 188(r19),r13 0x0019c648 <+528>: ldo 18c(r19),r20 0x0019c64c <+532>: ldw 18c(r19),r12 0x0019c650 <+536>: ldw 190(r19),r11=