From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8FEC33858D39; Tue, 28 Mar 2023 07:20:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8FEC33858D39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679988050; bh=YI0ODUUhEe81jd2jH63VzTyYNPUPaG3WwJLhIh3sp4U=; h=From:To:Subject:Date:In-Reply-To:References:From; b=NIZvaLBeR3lE4fKlpBVcB2HYjZOZSqL5A/CYy/eaAmdfJSXiRRlNCcVl7ueoimlc+ nEhnRgtAYjDp3oV4jhNOMdxwhGNYjGLP3K7NyMG1R9xkKbvh+hraKgeKwzzPi1/X8c cLAHXkIZBD5Jkla19UDSgrOZa0ecITqTl5NQ3CXY= From: "rguenth 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: Tue, 28 Mar 2023 07:20:50 +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: rguenth 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 #4 from Richard Biener --- (In reply to Jakub Jelinek from comment #3) > Tried -Ofast -mavx512f > #include >=20 > void > foo (double *a, double *b) > { > for (int i =3D 0; i < 1024; i++) > a[i] =3D pow (a[i], b[i]); > } >=20 > void > bar (double *a) > { > for (int i =3D 0; i < 1024; i++) > a[i] =3D cbrt (sqrt (a[i])); > } >=20 > void > baz (double *a) > { > for (int i =3D 0; i < 1024; i++) > a[i] =3D cbrt (cbrt (a[i])); > } > but that doesn't trigger, it uses simd clones rather than internal functi= ons. > Strangely, bar isn't vectorized while foo and baz are. I only see foo vectorized (with simdclones), neither bar nor baz are - prob= ably because cbrt isn't available in vector form and we don't resort to pow() here for baz because /* cbrt(cbrt(x)) -> pow(x,1/9), iff x is nonnegative. */ (simplify (cbrts (cbrts tree_expr_nonnegative_p@0)) (pows @0 { build_real_truncate (type, dconst_ninth ()); })) doesn't trigger. Later the 'powcabs' pass synthesizes cbrt(sqrt()) again but at least for me no cbrt vectorized variant is available.=