From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B5B60389850E; Mon, 16 Aug 2021 07:30:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B5B60389850E From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/101846] Improve __builtin_shufflevector emitted code Date: Mon, 16 Aug 2021 07:30:03 +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: 12.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 07:30:03 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101846 --- Comment #6 from CVS Commits --- The master branch has been updated by hongtao Liu : https://gcc.gnu.org/g:faf2b6bc527dff31725dde5538ffff1c92688047 commit r12-2919-gfaf2b6bc527dff31725dde5538ffff1c92688047 Author: liuhongt Date: Mon Aug 16 11:16:52 2021 +0800 Optimize __builtin_shuffle_vector. 1. Support vpermw/vpermb in ix86_expand_vec_one_operand_perm_avx512. 2. Support 256/128-bits vpermi2b ix86_expand_vec_perm_vpermt2. 3. Add define_insn_and_split to optimize specific vector permutation to opmov{dw,wb,qd}. gcc/ChangeLog: PR target/101846 * config/i386/i386-expand.c (ix86_expand_vec_perm_vpermt2): Support vpermi2b for V32QI/V16QImode. (ix86_extract_perm_from_pool_constant): New function. (ix86_expand_vec_one_operand_perm_avx512): Support vpermw/vpermb under TARGET_AVX512BW/TARGET_AVX512VBMI. (expand_vec_perm_1): Adjust comments for upper. * config/i386/i386-protos.h (ix86_extract_perm_from_pool_consta= nt): New declare. * config/i386/predicates.md (permvar_truncate_operand): New predicate. (pshufb_truncv4siv4hi_operand): Ditto. (pshufb_truncv8hiv8qi_operand): Ditto. * config/i386/sse.md (*avx512bw_permvar_truncv16siv16hi_1): New pre_reload define_insn_and_split. (*avx512f_permvar_truncv8siv8hi_1): Ditto. (*avx512f_vpermvar_truncv8div8si_1): Ditto. (*avx512f_permvar_truncv32hiv32qi_1): Ditto. (*avx512f_permvar_truncv16hiv16qi_1): Ditto. (*avx512f_permvar_truncv4div4si_1): Ditto. (*avx512f_pshufb_truncv8hiv8qi_1): Ditto. (*avx512f_pshufb_truncv4siv4hi_1): Ditto. (*avx512f_pshufd_truncv2div2si_1): Ditto. gcc/testsuite/ChangeLog: PR target/101846 * gcc.target/i386/pr101846-2.c: New test. * gcc.target/i386/pr101846-3.c: New test. * gcc.target/i386/pr101846-4.c: New test.=