public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "luoxhu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/100866] PPC: Inefficient code for vec_revb(vector unsigned short) < P9 Date: Fri, 18 Jun 2021 01:37:20 +0000 [thread overview] Message-ID: <bug-100866-4-Gy7agioZQD@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-100866-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100866 --- Comment #6 from luoxhu at gcc dot gnu.org --- For V4SI, it is also better to use vector splat and vector rotate operations. revb: .LFB0: .cfi_startproc vspltish %v1,8 vspltisw %v0,-16 vrlh %v2,%v2,%v1 vrlw %v2,%v2,%v0 blr Performance improved from 7.322s to 2.445s with a small benchmark due to load instruction replaced. But for V2DI, we don't have "vspltisd" to splat {32,32} to vector register before Power9, so lvx is still required? vector unsigned long long revb_pwr7_l(vector unsigned long long a) { return vec_rl(a, vec_splats((unsigned long long)32)); } generates: revb_pwr7_l: .LFB1: .cfi_startproc .LCF1: 0: addis 2,12,.TOC.-.LCF1@ha addi 2,2,.TOC.-.LCF1@l .localentry revb_pwr7_l,.-revb_pwr7_l addis %r9,%r2,.LC0@toc@ha addi %r9,%r9,.LC0@toc@l lvx %v0,0,%r9 vrld %v2,%v2,%v0 blr .LC0: .quad 32 .quad 32 .align 4
next prev parent reply other threads:[~2021-06-18 1:37 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-06-02 7:14 [Bug target/100866] New: " jens.seifert at de dot ibm.com 2021-06-02 15:03 ` [Bug target/100866] " segher at gcc dot gnu.org 2021-06-15 9:22 ` luoxhu at gcc dot gnu.org 2021-06-15 9:56 ` luoxhu at gcc dot gnu.org 2021-06-15 13:50 ` segher at gcc dot gnu.org 2021-06-16 5:53 ` luoxhu at gcc dot gnu.org 2021-06-18 1:37 ` luoxhu at gcc dot gnu.org [this message] 2021-06-18 8:32 ` jens.seifert at de dot ibm.com 2021-06-21 2:29 ` luoxhu at gcc dot gnu.org 2021-06-21 4:20 ` jens.seifert at de dot ibm.com 2021-06-21 12:42 ` wschmidt at gcc dot gnu.org 2021-06-21 12:46 ` wschmidt at gcc dot gnu.org 2021-06-21 19:27 ` segher at gcc dot gnu.org 2021-06-22 2:05 ` luoxhu at gcc dot gnu.org 2021-06-23 20:06 ` segher at gcc dot gnu.org 2022-11-02 8:42 ` cvs-commit at gcc dot gnu.org 2022-12-01 2:07 ` cvs-commit at gcc dot gnu.org 2022-12-14 5:52 ` 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-100866-4-Gy7agioZQD@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).