From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A30333857007; Sun, 19 Mar 2023 05:29:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A30333857007 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679203782; bh=c0mqlGoeKJMCPyBlNGv8Wa4Rp9LvwwWsenlIuM8OvqA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=pVgtw8vziheCOKlTb0mYtlW+BNubDOtyp7XeCgZVl7lc6dMnxyPFlrMelbqaao65o M9EeH89yHYcp3kKS1ZkjGdViSHmCCDyKcz76OzgPJqz99geYerlHUR1k6OxS5Jhtgb m2UJxktvAytIVaHSyfue20Ght2VgqCJUMG1b7nb0= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/108819] [12 Regression] ICE on valid code at -O1 with "-fno-tree-ccp -fno-tree-forwprop" on x86_64-linux-gnu: tree check: expected ssa_name, have integer_cst in number_of_iterations_cltz, at tree-ssa-loop-niter.cc:2394 Date: Sun, 19 Mar 2023 05:29:41 +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: 13.0 X-Bugzilla-Keywords: ice-on-valid-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: 12.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=3D108819 --- Comment #8 from CVS Commits --- The releases/gcc-12 branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:7a596c323a9c6af5e8825d2d99892452da7a4e58 commit r12-9275-g7a596c323a9c6af5e8825d2d99892452da7a4e58 Author: Jakub Jelinek Date: Sat Feb 18 12:40:49 2023 +0100 reassoc: Fold some statements [PR108819] This spot in update_ops can replace one or both of the assign operands = with constants, creating 1 & 1 and similar expressions which can confuse lat= er passes until they are folded. Rather than folding both constants by ha= nd and also handling swapping of operands for commutative ops if the first= one is constant and second one is not, the following patch just uses fold_stmt_inplace to do that. I think we shouldn't fold more than the single statement because that could screw up the rest of the pass, we'd have to mark all those with uids, visited and the like. 2023-02-18 Jakub Jelinek PR tree-optimization/108819 * tree-ssa-reassoc.cc (update_ops): Fold new stmt in place. * gcc.dg/pr108819.c: New test. (cherry picked from commit 32b5875c911f80d551d006d7473e6f1f8705857a)=