From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CD3F93858D37; Mon, 29 Apr 2024 17:18:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CD3F93858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1714411129; bh=vfRuBuLb4TtnIm56zfb7ylcw9KQDwZWj8Ig4Heu9eq8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=OmlKwXd98YoVjAJ+pmuc2rbpSZCpvLek3VR3olKuckaqsvJRxGXy5qhBmrFOTRzq9 Nq7v0GIrFF2bFMiArNrD8iYNtK6q0m2LT6jUoxfPA8+f0uCcitzeu0AHh0OQFjuSH2 YHJuds5SbQHff81e6u6KGHhtZ+/OgJqMAkgdi5q0= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/114883] [14/15 Regression] 521.wrf_r ICE with -O2 -march=sapphirerapids -fvect-cost-model=cheap Date: Mon, 29 Apr 2024 17:18:49 +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: 14.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub 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: 14.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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=3D114883 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #6 from Jakub Jelinek --- (In reply to Hongtao Liu from comment #4) > diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc > index a6cf0a5546c..ae6abe00f3e 100644 > --- a/gcc/tree-vect-loop.cc > +++ b/gcc/tree-vect-loop.cc > @@ -8505,7 +8505,8 @@ vect_transform_reduction (loop_vec_info loop_vinfo, > { > gcc_assert (code =3D=3D IFN_COND_ADD || code =3D=3D IFN_COND_SUB > || code =3D=3D IFN_COND_MUL || code =3D=3D IFN_COND_AND > - || code =3D=3D IFN_COND_IOR || code =3D=3D IFN_COND_XOR= ); > + || code =3D=3D IFN_COND_IOR || code =3D=3D IFN_COND_XOR > + || code =3D=3D IFN_COND_MIN); > gcc_assert (op.num_ops =3D=3D 4 > && (op.ops[reduc_index] > =3D=3D op.ops[internal_fn_else_index ((internal_fn) > code)])); >=20 > Could fix the ICE. Why IFN_COND_MIN and not IFN_COND_MAX? What about other binary cond_fns? I see DIV/MOD/RDIV/COPYSIGN/FMIN/FMAX/SHL/SHR. Though, SHL/SHR/COPYSIGN/DIV/MOD/RDIV aren't commutative nor associative, d= unno about if FMIN/FMAX could trigger. But certainly IFN_COND_MAX should be handled n= ext to IFN_COND_MIN.=