From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9649F385B526; Sat, 18 Feb 2023 11:41:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9649F385B526 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1676720487; bh=8dobIIYLCuS41CU18NVGt4P5aAIM+wjRLSDl9p7u2Rc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=m5+JtUCUQ48kDHKpqK0jGvaPLDIJ2xCmB6pj14BrFZtofZZ3bbsxY06zNzx0LmbQY zEifsYYkxIWI8kQ1WHMliP8wu4sDmp9z5ZtSVRi1FNSf6dfmS+nNjFjgngpbWp7u4s BGvNXqharETgBr9GQLaKKiOIThDIrcQ3P2zgY43o= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/108819] [12/13 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: Sat, 18 Feb 2023 11:41:24 +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 #5 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:32b5875c911f80d551d006d7473e6f1f8705857a commit r13-6132-g32b5875c911f80d551d006d7473e6f1f8705857a 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.=