From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BA9013857BAB; Tue, 25 Oct 2022 08:03:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BA9013857BAB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666685003; bh=f+KOQyy8yuwWH+YEg+gD/EIcneoHhi6Wqi9A15JNHmo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=XnTIxwm2Z7cTQFmgo34VtDDYOaoyQMtQuUtzpuY/brYjeTIlD+s5ii6Q5XkwlQt1M Lvo+28wpQFMMnYlZhseDAYddU6Aej/m/lemtk2WU6cooE4lCH4rtFe+CaOq1rDzUOI iyyh6qzhcdnEzxS//I2Uo2geaTHWIFVj2SMehHeU= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/100756] [12/13 Regression] vect: Superfluous epilog created on s390x Date: Tue, 25 Oct 2022 08:03:16 +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: 12.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit 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: 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=3D100756 --- Comment #6 from CVS Commits --- The master branch has been updated by Richard Biener : https://gcc.gnu.org/g:19295e8607da2f743368fe6f5708146616aafa91 commit r13-3476-g19295e8607da2f743368fe6f5708146616aafa91 Author: Richard Biener Date: Mon Oct 24 09:51:32 2022 +0200 tree-optimization/100756 - niter analysis and folding niter analysis, specifically the part trying to simplify the computed maybe_zero condition against the loop header copying condition, is confused by us now simplifying _15 =3D n_8(D) * 4; if (_15 > 0) to _15 =3D n_8(D) * 4; if (n_8(D) > 0) which is perfectly sound at the point we do this transform. One solution might be to involve ranger in this simplification, another is to be more aggressive when expanding expressions - the condition we try to simplify is _15 > 0, so all we need is expanding that to n_8(D) * 4 > 0. The following does just that. PR tree-optimization/100756 * tree-ssa-loop-niter.cc (expand_simple_operations): Also expand multiplications by invariants. * gcc.dg/vect/pr100756.c: New testcase.=