From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 58C8E3858D20; Wed, 23 Aug 2023 01:12:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 58C8E3858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1692753152; bh=kTc5mwxWq+hfHFXllru9nr+q8MJdRxCzqcAlwt6KgSE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=FUhKqrjXSLaA1WqTNfBfdFKdW7HN1Ue8dUr/ZTFSf2oedMOpQoNZ0/rwpZ6tQt5tq zLcM/NU4ScA1DaQ0gfDeNSAi/AxHSkT+YWN52M+i5oyiNfzbYTTI9O80t8AMQMBL2u X7F/eFsQ1RMj7MyhbXxAmSFwAilEpIPQFCa+jbKI= From: "crazylht at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/94866] Failure to optimize pinsrq of 0 with index 1 into movq Date: Wed, 23 Aug 2023 01:12:25 +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: 10.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: crazylht at gmail dot com X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ubizjak at gmail dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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=3D94866 Hongtao.liu changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |crazylht at gmail dot com --- Comment #3 from Hongtao.liu --- in x86 backend expand_vec_perm_1, we always tries vec_merge frist for !one_operand_p, expand_vselect_vconcat is only tried when vec_merge failed which means we'd better to use vec_merge instead of vec_select:vec_concat w= hen available in out backend pattern match. Also for the view of avx512 kmask instructions, use vec_merge will help constant propagation. 20107 /* Try the SSE4.1 blend variable merge instructions. */ 20108 if (expand_vec_perm_blend (d)) 20109 return true; 20110 20111 /* Try movss/movsd instructions. */ 20112 if (expand_vec_perm_movs (d)) 20113 return true;=