From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DF03C3858C2F; Thu, 27 Jul 2023 07:09:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DF03C3858C2F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1690441788; bh=uwXdKJc7y4B3/JImK0IykicewIR+cmTRNbTz8MAPkf0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=v48evW2GuI+EP19rwu04KoaLZF9ic41lf2DDrCLUBR+w9StS6j//ONBUUwmnlbwrt QZ7ukFbvRtD/SZA1md0Slz0cOXLwLJwYxsqdVthPDVm0gvzFdv6vjVXYrjQruKJ3Yj b1XOM3zPVJmCxLw9aTGVDsAJupC4A7hPYhgI2s6A= From: "crazylht at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/110788] Spilling to mask register for GPR vec_duplicate Date: Thu, 27 Jul 2023 07:09:48 +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: 14.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: crazylht at gmail dot com 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: 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=3D110788 --- Comment #2 from Hongtao.liu --- (In reply to Hongtao.liu from comment #1) > I prefer to add an UNSPEC to vpbroadcastm, don't want to mix gpr and kmask > too much for vec_duplicate:zero_extend pattern. And got this: .L3: vmovapd b(%rax), %ymm1{%k1} movl %edx, %esi subl $4, %edx movzwl %dx, %ecx vmulpd %ymm3, %ymm1, %ymm0{%k1}{z} vmovapd %ymm0, a(%rax){%k1} vpbroadcastd %ecx, %xmm0 addq $32, %rax vpcmpud $6, %xmm2, %xmm0, %k1 cmpw $4, %si ja .L3 vzeroupper=