https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63408
--- Comment #10 from Itay Perl ---
A few examples:
a=100, b=0x7fff -O0: 0.0 -O3: 200.0
a=0, b=0x7fff/100.0f -O0: -1.0 -O3: 1.0
a=0, b=-0x7fff/100.0f -O0: 1.0 -O3: -1.0
Replacing vfma with vfms sounds correct to
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63408
--- Comment #7 from Itay Perl ---
Any news? This bug still prevents us from compiling our code with
optimizations.
Thanks.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63408
--- Comment #2 from Itay Perl ---
Yes, I am certain.
1. Replacing the minus sign with a plus sign results in the same code
(including the constant)
2.
>>> struct.unpack('I', struct.pack('f', 100))[0]
1120403456
Assignee: unassigned at gcc dot gnu.org
Reporter: itay at phobotic dot com
When compiling the following function
float f(float a, int b)
{
return a - (((float)b / 0x7fff) * 100);
}
with the following command-line options
arm-none-eabi-gcc -O2 -mthumb -mfpu=fpv4-sp-d16