public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/100868] New: PPC: Inefficient code for vec_reve(vector double)
@ 2021-06-02  7:28 jens.seifert at de dot ibm.com
  2021-06-02 15:23 ` [Bug target/100868] " segher at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: jens.seifert at de dot ibm.com @ 2021-06-02  7:28 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 100868
           Summary: PPC: Inefficient code for vec_reve(vector double)
           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 double reve(vector double a)
{
   return vec_reve(a);
}

creates:

_Z4reveDv2_d:
.LFB3:
        .cfi_startproc
.LCF3:
0:      addis 2,12,.TOC.-.LCF3@ha
        addi 2,2,.TOC.-.LCF3@l
        .localentry     _Z4reveDv2_d,.-_Z4reveDv2_d
        addis 9,2,.LC2@toc@ha
        addi 9,9,.LC2@toc@l
        lvx 0,0,9
        xxlnor 32,32,32
        vperm 2,2,2,0
        blr

Optimal sequence would be:

vector double reve_pwr7(vector double a)
{
   return vec_xxpermdi(a,a,2);
}

which creates:

_Z9reve_pwr7Dv2_d:
.LFB4:
        .cfi_startproc
        xxpermdi 34,34,34,2
        blr

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

end of thread, other threads:[~2021-12-07  3:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-02  7:28 [Bug target/100868] New: PPC: Inefficient code for vec_reve(vector double) jens.seifert at de dot ibm.com
2021-06-02 15:23 ` [Bug target/100868] " segher at gcc dot gnu.org
2021-11-23  8:33 ` cvs-commit at gcc dot gnu.org
2021-12-07  3:42 ` 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).