public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/100869] New: z13: Inefficient code for vec_reve(vector double)
@ 2021-06-02  7:31 jens.seifert at de dot ibm.com
  2022-08-29  9:18 ` [Bug target/100869] " cvs-commit at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: jens.seifert at de dot ibm.com @ 2021-06-02  7:31 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 100869
           Summary: z13: Inefficient code for vec_reve(vector double)
           Product: gcc
           Version: 10.2.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
        larl    %r5,.L12
        vl      %v0,.L13-.L12(%r5),3
        vperm   %v24,%v24,%v24,%v0
        br      %r14


Optimal code sequence:

vector double reve_z13(vector double a)
{
   return vec_permi(a,a,2);
}

creates:

_Z6reve_2Dv2_d:
.LFB6:
        .cfi_startproc
        vpdi    %v24,%v24,%v24,4
        br      %r14
        .cfi_endproc

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

* [Bug target/100869] z13: Inefficient code for vec_reve(vector double)
  2021-06-02  7:31 [Bug target/100869] New: z13: Inefficient code for vec_reve(vector double) jens.seifert at de dot ibm.com
@ 2022-08-29  9:18 ` cvs-commit at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-08-29  9:18 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Robin Dapp <rdapp@gcc.gnu.org>:

https://gcc.gnu.org/g:8cdebe087619329facf19ba849d4d489a9a933e2

commit r13-2248-g8cdebe087619329facf19ba849d4d489a9a933e2
Author: Robin Dapp <rdapp@linux.ibm.com>
Date:   Fri Jun 24 15:15:14 2022 +0200

    s390: Use vpdi and verllg in vec_reve.

    Swapping the two elements of a V2DImode or V2DFmode vector can be done
    with vpdi instead of using the generic way of loading a permutation mask
    from the literal pool and vperm.

    Analogous to the V2DI/V2DF case reversing the elements of a four-element
    vector can be done by first swapping the elements of the first
    doubleword as well the ones of the second one and subsequently rotate
    the doublewords by 32 bits.

    gcc/ChangeLog:

            PR target/100869
            * config/s390/vector.md (@vpdi4_2<mode>): New pattern.
            (rotl<mode>3_di): New pattern.
            * config/s390/vx-builtins.md: Use vpdi and verll for reversing
            elements.

    gcc/testsuite/ChangeLog:

            * gcc.target/s390/zvector/vec-reve-int-long.c: New test.

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

end of thread, other threads:[~2022-08-29  9:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-02  7:31 [Bug target/100869] New: z13: Inefficient code for vec_reve(vector double) jens.seifert at de dot ibm.com
2022-08-29  9:18 ` [Bug target/100869] " cvs-commit 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).