public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/101989] Fail to optimize (a & b) | (c & ~b) to vpternlog instruction. Date: Tue, 24 Aug 2021 09:45:46 +0000 [thread overview] Message-ID: <bug-101989-4-q6fqk4O30u@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-101989-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101989 --- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by hongtao Liu <liuhongt@gcc.gnu.org>: https://gcc.gnu.org/g:6ddb30f941a44bd528904558673ab35394565f08 commit r12-3108-g6ddb30f941a44bd528904558673ab35394565f08 Author: liuhongt <hongtao.liu@intel.com> Date: Fri Aug 20 15:30:40 2021 +0800 Optimize (a & b) | (c & ~b) to vpternlog instruction. Also optimize below 3 forms to vpternlog, op1, op2, op3 are register_operand or unary_p as (not reg) A: (any_logic (any_logic op1 op2) op3) B: (any_logic (any_logic op1 op2) (any_logic op3 op4)) op3/op4 should be equal to op1/op2 C: (any_logic (any_logic (any_logic:op1 op2) op3) op4) op3/op4 should be equal to op1/op2 gcc/ChangeLog: PR target/101989 * config/i386/i386.c (ix86_rtx_costs): Define cost for UNSPEC_VTERNLOG. * config/i386/i386.h (STRIP_UNARY): New macro. * config/i386/predicates.md (reg_or_notreg_operand): New predicate. * config/i386/sse.md (*<avx512>_vternlog<mode>_all): New define_insn. (*<avx512>_vternlog<mode>_1): New pre_reload define_insn_and_split. (*<avx512>_vternlog<mode>_2): Ditto. (*<avx512>_vternlog<mode>_3): Ditto. (any_logic1,any_logic2): New code iterator. (logic_op): New code attribute. (ternlogsuffix): Extend to VNxDF and VNxSF. gcc/testsuite/ChangeLog: PR target/101989 * gcc.target/i386/pr101989-1.c: New test. * gcc.target/i386/pr101989-2.c: New test. * gcc.target/i386/avx512bw-shiftqihi-constant-1.c: Adjust testcase.
next prev parent reply other threads:[~2021-08-24 9:45 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-08-20 1:46 [Bug target/101989] New: " crazylht at gmail dot com 2021-08-20 1:50 ` [Bug target/101989] " crazylht at gmail dot com 2021-08-20 2:00 ` pinskia at gcc dot gnu.org 2021-08-24 9:45 ` cvs-commit at gcc dot gnu.org [this message] 2021-08-24 10:34 ` cvs-commit at gcc dot gnu.org 2021-08-24 10:35 ` crazylht at gmail dot com 2021-08-25 1:57 ` cvs-commit at gcc dot gnu.org 2021-08-25 2:32 ` pinskia at gcc dot gnu.org 2021-11-04 8:10 ` cvs-commit at gcc dot gnu.org 2022-09-25 19:35 ` ak at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-101989-4-q6fqk4O30u@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).