From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 08D73388905D; Thu, 8 Dec 2022 19:18:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 08D73388905D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1670527096; bh=IgohT4veUX+i+oaqFYO4/20JfT0fDY9REwtGiTJv+a8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=dpWChhf1PDlnaWy9WPKLd233Xb65gm0EX9Rn1MhfemRgdW9yGpu1okD6ONGPefmD8 Kj2vg5w2riqLNmTnKwBFSplD+9qkXJX7k6YTClCUsHP1GohVhO6IQG6NJIH5RkwM9c pHvMyGOKV0SAmv/Qm/Yrmp6mkr2KPC3CPOvhaXcQ= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/107997] [13 Regression] r13-4389-gfd8dd6c0384969 probably uncovered an issue building the Linux kernel Date: Thu, 08 Dec 2022 19:18:13 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub 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: 13.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=3D107997 --- Comment #6 from Jakub Jelinek --- create_new_iv is called with cand->pos being IP_END, where the last stmt of= the body is asm goto. __asm__ __volatile__ goto("" : : : : "l2" l2); ;; succ: 13 ;; basic block 13, loop depth 1 ;; pred: 9 ;; 12 # x_4 =3D PHI l2: As the label is in the same bb as fallthrough, the bb which ends with asm g= oto has just a single succ edge, but in order to insert something at the end of= the latch bb, we would need to create a new bb, move the label to it and insert the iv th= ere. I guess gsi_insert_on_edge_immediate should be able to handle that case, or perhaps just detect when gsi_last_bb (ip_end_pos (data->current_loop)) is GIMPLE_ASM or better yet stmt_ends_bb_p and split_edge in that case?=