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

--- Comment #13 from Uroš Bizjak <ubizjak at gmail dot com> ---
Created attachment 52051
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52051&action=edit
Patch that implements v2sf division

Please try the attached patch, for the following testcase:

--cut here--
float a[2], b[2], r[2];

void bar (void)
{
  int i;

  for (i = 0; i < 2; i++)
    r[i] = a[i] / b[i];
}
--cut here--

the compiler generates:

        movq    b(%rip), %xmm1
        movq    a(%rip), %xmm0
        movhps  .LC0(%rip), %xmm1
        divps   %xmm1, %xmm0
        movlps  %xmm0, r(%rip)
        ret

Reply via email to