From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 872E63858D38; Tue, 27 Feb 2024 08:44:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 872E63858D38 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1709023478; bh=BckNIdx82Sf0SfarupEtflCOvCZJWVpgVCTUr4IO4os=; h=From:To:Subject:Date:In-Reply-To:References:From; b=gavuX0hoqf4hdqV0TdAMU+fdpvKhMTvEe4zg8w5QXZYSwgDll8YpRmuMmUBrlLy21 S2SE85DPKLrHfIUr2sBiX2HfL7JWUBRQnbSJssLEp8LP5lMI5W8WO/Jq8eqMZluLaI evZk/lSwS7tOC1M3vyF9D4TEuK6ev4iwjTlQKUAo= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/100165] fmov could be used to zero out the upper bits instead of movi/zip or movi/ins with __builtin_shuffle and zero vector Date: Tue, 27 Feb 2024 08:44:38 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: pinskia at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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=3D100165 --- Comment #5 from Andrew Pinski --- For the ones which produce ins, it should be easy to modify the pattern to = emit fmov for those cases, that is `elt =3D=3D 0`: (define_insn "aarch64_simd_vec_set_zero" [(set (match_operand:VALLS_F16 0 "register_operand" "=3Dw") (vec_merge:VALLS_F16 (match_operand:VALLS_F16 1 "aarch64_simd_imm_zero" "") (match_operand:VALLS_F16 3 "register_operand" "0") (match_operand:SI 2 "immediate_operand" "i")))] "TARGET_SIMD && exact_log2 (INTVAL (operands[2])) >=3D 0" { int elt =3D ENDIAN_LANE_N (, exact_log2 (INTVAL (operands[2]))); operands[2] =3D GEN_INT ((HOST_WIDE_INT) 1 << elt); return "ins\\t%0.[%p2], zr"; } )=