From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D733E3858C78; Thu, 16 Feb 2023 19:34:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D733E3858C78 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1676576069; bh=59xvw4WWKsBm+bNA/NObGl/lgcWqJayPXs90DNT75sM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=qt2s4UoI+xlDLoVBU6IYPkoRYsBdts/y25FA//q2pnvFOibB5G/kuomkP041p6poI F0kXnn5aINm/yT8ntTG9KWpzmX8GhuGlqRIkpOCdGz2wyUsAdwBnvkv3Za4ATfN2PC FwzmmnmHrfzlI+Xz1D3R82Jjr9kB5GREFhzt7j5I= From: "pinskia 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: Thu, 16 Feb 2023 19:34:29 +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: pinskia at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.3 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: target_milestone bug_status short_desc cf_reconfirmed_on cf_known_to_work everconfirmed 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 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|13.0 |12.3 Status|UNCONFIRMED |NEW Summary|[13 Regression] ICE on |[12/13 Regression] ICE on |valid code at -O1 with |valid code at -O1 with |"-fno-tree-ccp |"-fno-tree-ccp |-fno-tree-forwprop" on |-fno-tree-forwprop" on |x86_64-linux-gnu: tree |x86_64-linux-gnu: tree |check: expected ssa_name, |check: expected ssa_name, |have integer_cst in |have integer_cst in |number_of_iterations_cltz, |number_of_iterations_cltz, |at |at |tree-ssa-loop-niter.cc:2394 |tree-ssa-loop-niter.cc:2394 Last reconfirmed| |2023-02-16 Known to work| |11.1.0, 11.3.0 Ever confirmed|0 |1 --- Comment #1 from Andrew Pinski --- _7 =3D 1 & 1; That I think is wrong but I think the problem is before ivcanon and it was latent in GCC 12 even. reassoc1 produces: [local count: 114863530]: _20 =3D a.0_1 =3D=3D 0; _21 =3D a.0_1 > 0; _7 =3D 1 & 1; if (_7 !=3D 0) goto ; [89.30%] else goto ; [10.70%] From: [local count: 114863530]: _20 =3D a.0_1 =3D=3D 0; _21 =3D a.0_1 > 0; _22 =3D _20 & _21; if (_22 !=3D 0) goto ; [89.30%] else goto ; [10.70%] All it has: Optimizing range tests a.0_1 -[, 0] and +[, 0] and +[0, 0] into 0 GCC 11 looks ok though: From: a.0_1 =3D a; if (a.0_1 <=3D 0) goto ; [20.45%] else goto ; [79.55%] [local count: 114863530]: _20 =3D a.0_1 =3D=3D 0; _21 =3D a.0_1 > 0; _22 =3D _20 & _21; if (_22 !=3D 0) goto ; [89.30%] else goto ; [10.70%] to: a.0_1 =3D a; _20 =3D a.0_1 =3D=3D 0; _16 =3D 0; _21 =3D a.0_1 > 0; _7 =3D 1 & _16; if (_7 !=3D 0) goto ; [89.30%] else goto ; [10.70%] So I am going to declare this as a latent bug (which the verifiers don't ca= tch either ...).=