Both Intel FMA and AMD SSE5 support FMA. For -mfma, which enables
Intel FMA and is a dummy at the moment, or -msse5, we will
generate FMA instructions for

double f;

void
foo (double x, double y, double z)
{
  f = x * y + z;
}

What FMA should "-mfma -msse5" generate? Also currently, with
"-O2 -mavx -msse5", we generate

foo:
        fmaddsd %xmm2, %xmm1, %xmm0, %xmm0
        vmovsd  %xmm0, f(%rip)
        ret

which won't run on any machines. For "-mfma -msse5" and
"-mavx -msse5",

1. Should these combinations be allowed? If allowed,
2. Should the last option turn off the first one?


-- 
           Summary: -mfma/-mavx and -msse5/-msse4a don't work together
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hjl dot tools at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38201

Reply via email to