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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Take your example and convert it into different functions:
float a(void)
{
  return 2.0;
}

float b(float a)
{
  return 2.0 * a;
}

double d(void)
{
  return 3.0;
}

double e(double d)
{
  return 3.0 * d;
}

double z(float a, double d)
{
  return 2.0 * a + 3.0 * d;
}

---- CUT ----
a:
.LFB0:
        .cfi_startproc
        vmovss  .LC0(%rip), %xmm0 ;;; load single
        ret
b:
.LFB1:
        .cfi_startproc
        vaddss  %xmm0, %xmm0, %xmm0 ;;; add single (same as a*2.0)
        ret
d:
.LFB2:
        .cfi_startproc
        vmovsd  .LC1(%rip), %xmm0 ;;; load double
        ret
e:
.LFB3:
        .cfi_startproc
        vmulsd  .LC1(%rip), %xmm0, %xmm0 ;;; multiple double
        ret
z:
.LFB4:
        .cfi_startproc
        vmulsd  .LC1(%rip), %xmm1, %xmm1  ;; multiple double
        vcvtss2sd       %xmm0, %xmm0, %xmm0 ;; convert single to double
        vfmadd132sd     .LC2(%rip), %xmm1, %xmm0 ;; multiple add double
        ret

Reply via email to