From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B62BF389850A; Mon, 22 Feb 2021 16:47:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B62BF389850A From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/99199] [9/10/11 Regression] Very large boolean expression leads to quite a few return statements Date: Mon, 22 Feb 2021 16:47:26 +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: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub 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: 11.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 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: Mon, 22 Feb 2021 16:47:26 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99199 --- Comment #2 from Jakub Jelinek --- Until before pro_and_epilogue we have a bb with just code_label, note and return reg use which has 65 predecessors. The pro_and_epilogue pass turns that into 65 simple_return jumps. The ret insns at the end are there since the bbro pass, before that they ar= e at various spots in the IL and depending on the branch probabilities could even make sense. I guess we'd need some simplified crossjumping either during the bbro pass = when going from cfglayout mode into cfgrtl mode, or afterwards (but not too many passes are left there) that would be able to cross-jump bbs containing thos= e: (code_label 1552 999 925 128 147 (nil) [1 uses]) (note 925 1552 1389 128 [bb 128] NOTE_INSN_BASIC_BLOCK) (insn 1389 925 926 128 (use (reg/i:QI 0 ax)) -1 (nil)) (jump_insn 926 1389 927 128 (simple_return) 837 {simple_return_internal} (nil) -> simple_return)=