public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/100866] New: PPC: Inefficient code for vec_revb(vector unsigned short) < P9
@ 2021-06-02  7:14 jens.seifert at de dot ibm.com
  2021-06-02 15:03 ` [Bug target/100866] " segher at gcc dot gnu.org
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: jens.seifert at de dot ibm.com @ 2021-06-02  7:14 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100866

            Bug ID: 100866
           Summary: PPC: Inefficient code for vec_revb(vector unsigned
                    short) < P9
           Product: gcc
           Version: 8.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jens.seifert at de dot ibm.com
  Target Milestone: ---

Input:

vector unsigned short revb(vector unsigned short a)
{
   return vec_revb(a);
}

creates:

_Z4revbDv8_t:
.LFB1:
        .cfi_startproc
.LCF1:
0:      addis 2,12,.TOC.-.LCF1@ha
        addi 2,2,.TOC.-.LCF1@l
        .localentry     _Z4revbDv8_t,.-_Z4revbDv8_t
        addis 9,2,.LC1@toc@ha
        addi 9,9,.LC1@toc@l
        lvx 0,0,9
        xxlnor 32,32,32
        vperm 2,2,2,0
        blr


Optimal code sequence:
vector unsigned short revb_pwr7(vector unsigned short a)
{
   return vec_rl(a, vec_splats((unsigned short)8));
}

_Z9revb_pwr7Dv8_t:
.LFB2:
        .cfi_startproc
        .localentry     _Z9revb_pwr7Dv8_t,1
        vspltish 0,8
        vrlh 2,2,0
        blr

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2022-12-14  5:52 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-02  7:14 [Bug target/100866] New: PPC: Inefficient code for vec_revb(vector unsigned short) < P9 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
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

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).