From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6704E3858C52; Thu, 21 Sep 2023 15:34:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6704E3858C52 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1695310445; bh=idtGQaHgkBL1QEovlRF4ECIWXb2qk4dwYKn+bERx8+g=; h=From:To:Subject:Date:In-Reply-To:References:From; b=iuTmqL99MrD7L1kUpW2yNzR5pToGMPjhzP9BTsFcMwKscUyFcu/2DytyV50E9IFev Gdil0+A+vZFHcggDkuzeOZqV9frFDqTiGq8xTxON5jLbZ3mj+AuyIwy63ZG0FMC4hl hKbHWrwz5mtCn6G15RqNwakFlIvxnJzsy370XzC0= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/111515] [14 Regression] Missed Dead Code Elimination since r14-4089-gd45ddc2c04e Date: Thu, 21 Sep 2023 15:34:05 +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: 14.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth 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=3D111515 --- Comment #2 from Andrew Pinski --- Looks like an early jump threading happens in n and then the size differenc= es causes inlining heurstics not to chose the function for inlining because it= is inlining into `main`. If we change main to `f` or `main1`, then n is inlined and there is no missed optimization ...=