From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6CB1D3858403; Mon, 22 Apr 2024 08:08:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6CB1D3858403 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1713773321; bh=vKJNJooFfhu9OqCemxQwx9s79JRfwKTBo6CYNlznJaQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=RlN15PYLrX6m/so7nvgmtP/i/+T8EIiyywBAxVRLOaZjJf+7gj44hcZnp9EpTJnDp lXvNfJuyK/P8UbopRGyzDIQlsa4RkRYTWyDmw7gSt5P5CfHY8F81CcWbTA+Dy36wsQ +oMl9Z3EVLFzc0+K1miGGW3gKVONhUIgPG/ZnySg= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/114787] [13/14 Regression] wrong code at -O1 on x86_64-linux-gnu (the generated code hangs) Date: Mon, 22 Apr 2024 08:08:39 +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: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.3 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=3D114787 --- Comment #9 from Jakub Jelinek --- It is the if (dump_file && (dump_flags & TDF_DETAILS) && max_loop_iterations_int (loop) >=3D 0) { fprintf (dump_file, "Loop %d iterates at most %i times.\n", loop->num, (int)max_loop_iterations_int (loop)); } if (dump_file && (dump_flags & TDF_DETAILS) && likely_max_loop_iterations_int (loop) >=3D 0) { fprintf (dump_file, "Loop %d likely iterates at most %i times.\n", loop->num, (int)likely_max_loop_iterations_int (loop)); } cases which trigger the different code generation with -fdump-tree-profile_estimate-details -O1, either of them; guess max_loop_iterations_int and likely_max_loop_iterations_int cache the results and while it doesn't change the IL from the profile_estimate pass, it chang= es the behavior of the cunroll pass later on.=