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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
>Instead, when compiled without optimizations or on other architectures 

x86_64 base arch does not include fma which is why you don't see that.
powerpc will see the difference.

Also you can see the difference here:
```

   #include <stdio.h>
   #include <math.h>

[[gnu::noipa]]
double f(double a)
{
  return a;
}

   int main() {
     int n = 41;
     double x;

     for (int i = 1; i <= n; i++) {
       x = f(1 - (i-1) * (1.0/(n-1)));
     }
     printf("%f %f\n", x, f(1 - (n-1) * (1.0/(n-1))));
   }
```

In the case of using the fma you get -0.0 while without you get 0.0.

Reply via email to