From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A54923858D20; Thu, 17 Feb 2022 07:58:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A54923858D20 From: "vries at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/104440] nvptx: FAIL: gcc.c-torture/execute/pr53465.c execution test Date: Thu, 17 Feb 2022 07:58:35 +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: 12.0 X-Bugzilla-Keywords: testsuite-fail X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: NEW 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Feb 2022 07:58:35 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104440 --- Comment #10 from Tom de Vries --- A good thing to note at this point: why doesn't init-regs work here? The pass works per insn, and when hitting the insn with the problematic use: ... (gdb) call debug_rtx (insn) (insn 18 17 19 4 (set (reg/v:SI 30 [ c ]) (reg/v:SI 26 [ d ])) 6 {*movsi_insn} (expr_list:REG_DEAD (reg/v:SI 26 [ d ]) (nil))) ... and dealing with the use of reg 26 we test: ... /* A use is MUST uninitialized if it reaches the top of=20=20= =20=20=20=20=20=20=20=20=20 the block from the inside of the block (the lr test)=20=20= =20=20=20=20=20=20=20=20=20 and no def for it reaches the top of the block from=20=20= =20=20=20=20=20=20=20=20=20=20 outside of the block (the ur test). */ if (bitmap_bit_p (lr, regno) && (!bitmap_bit_p (ur, regno))) ... where: ... bitmap lr =3D DF_LR_IN (bb); bitmap ur =3D DF_LIVE_IN (bb); ... But we have: ... (gdb) p bitmap_bit_p (lr, regno) $1 =3D true (gdb) p bitmap_bit_p (ur, regno) $2 =3D true ... so the test fails. In terms of the rtl-dump, the insn is here: ... (code_label 43 42 17 4 4 (nil) [1 uses]) (note 17 43 18 4 [bb 4] NOTE_INSN_BASIC_BLOCK) (insn 18 17 19 4 (set (reg/v:SI 30 [ c ]) (reg/v:SI 26 [ d ])) 6 {*movsi_insn} (expr_list:REG_DEAD (reg/v:SI 26 [ d ]) (nil))) ... and the corresponding df info is: ... ( 7 3 )->[4]->( 8 5 ) ;; bb 4 artificial_defs: { } ;; bb 4 artificial_uses: { u-1(1){ }u-1(2){ }u-1(3){ }} ;; lr in 1 [%stack] 2 [%frame] 3 [%args] 25 26 31 32 52 ;; lr use 1 [%stack] 2 [%frame] 3 [%args] 25 26 ;; lr def 26 30 38 ;; live in 1 [%stack] 2 [%frame] 3 [%args] 25 26 31 32 52 ;; live gen 26 30 38 ;; live kill ;; lr out 1 [%stack] 2 [%frame] 3 [%args] 25 26 30 31 32 52 ;; live out 1 [%stack] 2 [%frame] 3 [%args] 25 26 30 31 32 52 ... In short, init-regs doesn't work for this example, because reg 26 is define= d on some incoming path, and ptx (or the JIT implementation) needs it to be defi= ned on all incoming paths.=