public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "meissner at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/104124] Poor optimization for vector splat DW with small consts Date: Thu, 27 Jan 2022 21:16:08 +0000 [thread overview] Message-ID: <bug-104124-4-pdOrgVgl5N@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-104124-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104124 --- Comment #3 from Michael Meissner <meissner at gcc dot gnu.org> --- There are two things going on. 1) There is no vspltisd instruction, so we can't generate a single instruction to load constants other than 0 or -1. Unfortunately, this was not added in either power9 or power10. 2) On the power9 and power10 we have the xxspltib and vecsb2d instructions, and we generate those if -mcpu=power9. To add support for new types of constants, the procedure is: 1) You need to modify easy_altivec_constant and gen_altivec_constant in rs6000.c (or rs6000.cc in GCC 12). Then add new predicates in predicate.md for these new patterns. 2) Look for the predicates "easy_vector_constant_add_self" and so forth in predicates.md and add a new predicate here. 3) Then in altivec.md, look for the define_splits that use the various easy_vector_const_* functions and add a new pattern.
next prev parent reply other threads:[~2022-01-27 21:16 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-01-19 17:40 [Bug target/104124] New: " munroesj at gcc dot gnu.org 2022-01-19 17:51 ` [Bug target/104124] " munroesj at gcc dot gnu.org 2022-01-27 20:11 ` munroesj at gcc dot gnu.org 2022-01-27 21:16 ` meissner at gcc dot gnu.org [this message] 2023-06-28 8:39 ` cvs-commit at gcc dot gnu.org 2023-06-28 20:21 ` munroesj at gcc dot gnu.org 2023-07-13 7:22 ` guihaoc 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-104124-4-pdOrgVgl5N@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).