From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 991EA3858419; Thu, 21 Mar 2024 11:49:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 991EA3858419 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1711021795; bh=iV0d5wHcBARDKT1aB3QAlAsGyPH1YjaM6sCU8icvsHI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Vx159YlG9SYGz5s0ts3Rl0tBNUJVQmnLzpknAGFRVSl8QEvGq2lmf1OFsT2hwV25a Qbf0ByfNBly1il1b6zg9jpTsqhjpcPJPGDMsomcxty9WeLbCfk9nbsx+NIVAJgMu+A KNO6pckGYFoXOWj/ug7zgJoT783E24BlTCaNJDXQ= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/114203] [13 Regression] Miscompilation: A possible miscompilation in GCC 13 and 14 with option -Os Date: Thu, 21 Mar 2024 11:49:54 +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: needs-bisection, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: rguenth 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=3D114203 --- Comment #4 from GCC Commits --- The releases/gcc-13 branch has been updated by Richard Biener : https://gcc.gnu.org/g:a729b1227bc8c84cd91a3b8c9c9d11bc43d415de commit r13-8482-ga729b1227bc8c84cd91a3b8c9c9d11bc43d415de Author: Richard Biener Date: Mon Mar 4 10:38:31 2024 +0100 tree-optimization/114203 - wrong CLZ niter computation For precision less than int we apply the adjustment to make it defined at zero after the adjustment to make it compute CLZ rather than CTZ. That's wrong. PR tree-optimization/114203 * tree-ssa-loop-niter.cc (build_cltz_expr): Apply CTZ->CLZ adjustment before making the result defined at zero. * gcc.dg/torture/pr114203.c: New testcase. (cherry picked from commit cde50296a19b109909089b91d532d2c8455f5f10)=