From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5545F385840D; Tue, 23 Apr 2024 22:47:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5545F385840D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1713912435; bh=6NnTdd8HOC/jpcMHLWs1MFxqnA6/eKTkya5L6s/4pkU=; h=From:To:Subject:Date:From; b=O2RRSoX8G9fJyf0v8kNlpzEyBgweIfvJU64dBJwLGy+5WM5Oz+5FYnvFpiJJ8HTfR ZX8Owxb585QCTkbAGjFffKibsmyOACk8I7QoQIGu4XPD2bPSzpRJHGGoA87DeJ56Cn XQ2lKFNT6c8rswMpObKOaCdme7WjPUiASNQUTh/Y= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/114829] New: No fcsel produced for f16 Date: Tue, 23 Apr 2024 22:47:14 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: pinskia 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: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter target_milestone Message-ID: 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=3D114829 Bug ID: 114829 Summary: No fcsel produced for f16 Product: gcc Version: 14.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: enhancement Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: pinskia at gcc dot gnu.org Target Milestone: --- Take: ``` void foo (int a, _Float16 b1, _Float16 b2, _Float16 *b) { *b =3D a ? b1 : b2; } ``` This should produce: ``` foo: cmp w0, #0 fcsel h0, h1, h0, eq str h0, [x1] ret ``` Or : ``` foo: cmp w0, #0 fcsel s0, s1, s0, eq str h0, [x1] ret ``` Depending on if we have fp16 enabled or not. Right now GCC produces branches instead. Noticed while working on PR 98477 since *cmov_insn pattern uses GPF iterator and not GPF_F16.=