From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BB0543858298; Wed, 29 Mar 2023 06:37:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BB0543858298 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1680071876; bh=EXdjs1FR3VHKcFq747Gm0/RpfB17XX3gOG/hAQLLHdE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=cPIMLJptDNN1ywrFSNXJaiJa4d6KyKQqeU/cPvs5c/tt6AtTTFfSgzcZ/rQpP64i5 +d9qDr16R5VJgrs+Z1I8Kt0dgh4L3ibg844sCx7l2y+CWeRWnkrfCJojKwFxu/z15r EKlQQkuxh8k1bGpGp2RVCjxdwcEJpzBmSMnwmE7U= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/109301] [13 Regression] ICE in format_helper, at real.h:233 since r13-1763 Date: Wed, 29 Mar 2023 06:37:56 +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: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.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=3D109301 --- Comment #5 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:8dd57939c20b5e218404a838f514429f8e414dea commit r13-6924-g8dd57939c20b5e218404a838f514429f8e414dea Author: Jakub Jelinek Date: Wed Mar 29 08:33:30 2023 +0200 tree-ssa-math-opts: Move PROP_gimple_opt_math from sincos pass to powca= bs [PR109301] The following testcase ICEs since the sincos and vect pass order has been swapped. It is not valid to replace vector sqrt (sqrt (x)) with pow (x, 0.25) because build_real on vector type is invalid (could be handled by using build_uniform_cst and adjusting type passed to build_real) but more importantly because nothing checks if we can actually do vector pow. While we have pow_optab, apparently no target defines it, so it doesn't seem to be worth bothering with for now and the patch just punts on non-scalar sqrts. I think the other simplifications next to it are fine, as they mostly use CBRT which doesn't even have internal function (so is a builtin only and therefore always scalar), or have already pow in the IL (which doesn't have optab and shouldn't be thus vector either). It is true that with we do vectorize some calls to pow or cbrt (but don't handle others strangely), but those aren't using internal functions but simd clones and so match.pd doesn't know anything about those (at least for now). The following patch fixes it by mostly restoring the state before r13-1763 where canonicalize_math_p () was true only until the end of the pass which transformed pow or pow-like calls before vectorization (form= erly sincos pass, now it is powcabs pass). powcabs is a pass in the spot sincos was happening before, so the only change was defer the sin+cos simplification into cexpi to a later new pass (except for the name moving with it) and none of the canonicalize_math_p () guarded simplification in match.pd seem to rely on those sin+cos -> cexpi simplifications and canonicalize_math_p is the only user of this property. 2023-03-29 Jakub Jelinek Richard Biener PR tree-optimization/109301 * tree-ssa-math-opts.cc (pass_data_cse_sincos): Change properties_provided from PROP_gimple_opt_math to 0. (pass_data_expand_powcabs): Change properties_provided from 0 to PROP_gimple_opt_math. * gcc.dg/pr109301.c: New test.=