From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 600EC3858D33; Tue, 31 Jan 2023 20:24:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 600EC3858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675196674; bh=qOaHau0JEWIXELoX1+9I0HvLUhb+eEGMEie5k0MviZQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ZEykpic7Te4spHRD7JtBXfu+zUYhiB9XhJy3fiL/YZ3G89wa0w07W5DdxJQY2BVtX WqLEZZnVD6VuP+pwYqpX9rvGIFWtc1ZXH3PbpzBHY9LaVX0W1WjvAUh/ChmNhIK/yZ CG7O31P/Az333PYsyVejFqaKdxVjKTYv6sNTB37g= From: "tnfchris at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/108601] [13 Regression] vector peeling ICEs with VLA in gcc_r in SPEC2017 since g:c13223b790bbc5e4a3f5605e057eac59b61b2c85 Date: Tue, 31 Jan 2023 20:24:32 +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: tnfchris at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cf_gcctarget short_desc 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=3D108601 Tamar Christina changed: What |Removed |Added ---------------------------------------------------------------------------- Target| |aarch64* Summary|[13 Regression] vector |[13 Regression] vector |peeling ICEs with PGO + LTO |peeling ICEs with VLA in |+ IPA inlining in gcc_r in |gcc_r in SPEC2017 since |SPEC2017 |g:c13223b790bbc5e4a3f5605e0 | |57eac59b61b2c85 --- Comment #7 from Tamar Christina --- (In reply to Andrew Pinski from comment #1) > So here is how I would tackle this: > Put all the needed .i/.ii files in a response file. >=20 >=20 > $CC -c @files @options > $CC -r -o file.o @fileso @options=20 >=20 > Since this is only at profile generated stage it is not as hard ... > Then start by reducing the needed .o files in `fileso` . > When that is finished. Update `files` to match `fileso`. > and then run delta (or another automated reducer) over the files in `file= s`. > Maybe even change -flto=3Dauto etc. Thanks! Managed to reduce it to something fairly simple. Repro: ---- decode_options() { int flag =3D 1; for (; flag <=3D 1 << 21; flag <<=3D 1) ; } ---- compile with gcc -fprofile-generate -mcpu=3Dneoverse-v1 -Ofast opts.i I also did a bisect and indeed it landed on commit c13223b790bbc5e4a3f5605e057eac59b61b2c85 Author: liuhongt Date: Thu Aug 4 09:04:22 2022 +0800 Extend vectorizer to handle nonlinear induction for neg, mul/lshift/rsh= ift with a constant. For neg, the patch create a vec_init as [ a, -a, a, -a, ... ] and no vec_step is needed to update vectorized iv since vf is always multiple of 2(negative * negative is positive). For shift, the patch create a vec_init as [ a, a >> c, a >> 2*c, ..] as vec_step as [ c * nunits, c * nunits, c * nunits, ... ], vectorized = iv is updated as vec_def =3D vec_init >>/<< vec_step. For mul, the patch create a vec_init as [ a, a * c, a * pow(c, 2), ..] as vec_step as [ pow(c,nunits), pow(c,nunits),...] iv is updated as vec= _def =3D vec_init * vec_step. The patch handles nonlinear iv for 1. Integer type only, floating point is not handled. 2. No slp_node. 3. iv_loop should be same as vector loop, not nested loop. 4. No UD is created, for mul, use unsigned mult to avoid UD, for shift, shift count should be less than type precision.=