From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A8FC7385843E; Mon, 6 Nov 2023 12:35:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A8FC7385843E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1699274105; bh=RsjZ8vJvRhj2GZcYfIZlRC4V/Rs93kmf0wu9cWDiX7c=; h=From:To:Subject:Date:In-Reply-To:References:From; b=lhq8/IwXPmtsuw2EzgirWmka9OfJQbYtbwfKW1/+D4PBsnEao86bKvmc0CKcGNY0b AjzeVhtWb1EMY/O3txX7Ikfy6rHBSlVIjSNVsLwBmzdiZylJ+343z/yTjiwjbolgAR TVIzp9GMVm5NTN0HYNArJdgmmFD/uatUYtLi6YEI= From: "rguenther at suse dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/112359] [14 Regression] ICE: in expand_fn_using_insn, at internal-fn.cc:215 with -O -ftree-loop-if-convert -mavx512fp16 Date: Mon, 06 Nov 2023 12:35:05 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenther at suse dot de X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.0 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=3D112359 --- Comment #3 from rguenther at suse dot de --- On Mon, 6 Nov 2023, rdapp at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D112359 >=20 > --- Comment #2 from Robin Dapp --- > Would something like >=20 > + bool allow_cond_op =3D flag_tree_loop_vectorize > + && !gimple_bb (phi)->loop_father->dont_vectorize; >=20 > in convert_scalar_cond_reduction be sufficient or are the more conditions= to > check still? Testing with the above and the reduced testcase worked FWIW. You want, in tree_if_conversion (), remember whether we versioned the loop as part of if (need_to_lower_bitfields || need_to_predicate || any_complicated_phi || flag_tree_loop_if_convert !=3D 1) { ... and pass that as flag to combine_blocks and down to predicate_all_scalar_phis (or add a new global flag). Ideally we'd do the convert_scalar_cond_reduction analysis beforehand and force versioning for the case we'd generate a .COND_* instead of deciding at code-generation only (when it's too late to do the required versioning).=