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

Reply via email to