From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DDC19385C426; Thu, 16 Apr 2020 14:26:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DDC19385C426 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1587047186; bh=mg8mkL5rpHY+W3b2cYiJauauRWgnXRY2g/6+EQBvyqo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=bSOqKGugVtMPChg6vD2uNkFDK2/GXq9oUv13PgHj2vGJlqeRfj6NOHcR2DUXnvYOd f3IuMhkovBIGjY3sPu+Nms+IBWLYmKrkhG58QW1EJ4pP79O5RB4xWEFfSgzID0aPLk b0NZNc2C+wrxIcCZ5FKBPHp6WPQh+Q0uywwr0ef0= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/94618] [8/9/10 Regression] '-fcompare-debug' failure (length) with -O2 -fnon-call-exceptions since r8-565-g7581ce9a1ad6df9c Date: Thu, 16 Apr 2020 14:26:26 +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: 10.0 X-Bugzilla-Keywords: ra X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth 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: 8.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc keywords component 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, 16 Apr 2020 14:26:27 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94618 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |vmakarov at gcc dot gnu.org Keywords| |ra Component|debug |rtl-optimization --- Comment #3 from Richard Biener --- diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index e99fb9ff5d1..e508d736de8 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -9019,7 +9019,7 @@ split_critical_edges (bool for_edge_insertion_p /* =3D false */) { gimple_stmt_iterator gsi; - gsi =3D gsi_last_bb (e->src); + gsi =3D gsi_last_nondebug_bb (e->src); if (!gsi_end_p (gsi) && stmt_ends_bb_p (gsi_stmt (gsi)) && (gimple_code (gsi_stmt (gsi)) !=3D GIMPLE_RETURN Doesn't fix it, disabling tail merging doesn't either. The difference is --- t.gkd 2020-04-16 16:15:15.906645135 +0200 +++ t.gk.gkd 2020-04-16 16:15:16.082647662 +0200 @@ -29,7 +29,7 @@ (pc))) "t.C":17:5# {*jcc} (expr_list:REG_DEAD (reg:CCZ 17 flags) (int_list:REG_BR_PROB 536870916 (nil))) - -> 13) + -> 14) (note # 0 0 [bb 3] NOTE_INSN_BASIC_BLOCK) (note # 0 0 NOTE_INSN_DELETED) (insn/f:TI # 0 0 3 (set (mem:DI (pre_dec:DI (reg/f:DI 7 sp)) [ S8 A8]) @@ -74,13 +74,13 @@ (const_int 8 [0x8])) [ MEM[(struct S *)this_2(D) + 8B].ae+= 0 S4 A32])) "t.C":8:12# {*movsi_internal} (expr_list:REG_EH_REGION (const_int -5 [0xfffffffffffffffb]) (nil))) +(note # 0 0 # NOTE_INSN_EH_REGION_BEG) (insn # 0 0 3 (set (reg:CCZ 17 flags) (compare:CCZ (mem:SI (plus:DI (reg/f:DI 5 di [orig:93 this ] [93]) (const_int 12 [0xc])) [ MEM[(struct S *)this_2(D) + 8B].af+0 S4 A32]) (reg:SI 6 bp [orig:87 _10 ] [87]))) "t.C":18:28# {*cmpsi_1} (expr_list:REG_DEAD (reg/f:DI 5 di [orig:93 this ] [93]) - (expr_list:REG_EH_REGION (const_int -6 [0xfffffffffffffffa]) - (nil)))) + (nil))) (jump_insn # 0 0 3 (set (pc) (if_then_else (eq (reg:CCZ 17 flags) (const_int 0 [0])) @@ -98,7 +98,6 @@ (insn # 0 0 4 (set (reg:DI 5 di) (reg/f:DI 41 r13 [orig:82 _1 ] [82])) "t.C":19:4# {*movdi_internal} (nil)) -(note # 0 0 # NOTE_INSN_EH_REGION_BEG) (call_insn:TI # 0 0 4 (call (mem:QI (symbol_ref:DI ("_ZN1S1iEi") [flags 0x= 41]=20 ) [ i S1 A8]) (const_int 0 [0])) "t.C":19:4# {*call} (expr_list:REG_DEAD (reg:DI 5 di) @@ -246,7 +245,7 @@ -> simple_return) (barrier # 0 0) (note # 0 0 NOTE_INSN_DELETED) -(code_label # 0 0 9 13 (nil) [1 uses]) +(code_label # 0 0 9 14 (nil) [1 uses]) (note # 0 0 [bb 9] NOTE_INSN_BASIC_BLOCK) (insn:TI # 0 0 9 (unspec_volatile [ (const_int 0 [0]) but on GIMPLE I cannot see any difference in EH info. Starting with LRA I see the disconnect with REG_EH_REGION notes on insn 17 / 41: (insn 17 16 18 3 (set (reg:CCZ 17 flags) (compare:CCZ (mem:SI (plus:DI (reg/f:DI 3 bx [orig:93 this ] [93]) (const_int 12 [0xc])) [1 MEM[(struct S *)this_2(D) + 8B].af+0 S4 A32]) (reg:SI 6 bp [orig:87 _10 ] [87]))) "t.C":18:28 11 {*cmpsi_1} (expr_list:REG_EH_REGION (const_int -6 [0xfffffffffffffffa]) (nil))) vs. (insn 41 40 42 3 (set (reg:CCZ 17 flags) (compare:CCZ (mem:SI (plus:DI (reg/f:DI 3 bx [orig:93 this ] [93]) (const_int 12 [0xc])) [1 MEM[(struct S *)this_2(D) + 8B].af+0 S4 A32]) (reg:SI 6 bp [orig:87 _10 ] [87]))) "t.C":18:28 11 {*cmpsi_1} (nil))=