Go version
go1.26.0
Output of go env in your module/workspace:
What did you do?
Minimal reproduction available here: https://godbolt.org/z/r9PfEeW5d
What did you see happen?
a * b + c gets optimized to a single VFMADD231SS instruction, nice
However a a * b - c compiles to a MULSS followed by a SUBSS even though there is a complementary instruction VFMSUB231SS
What did you expect to see?
The expression a * b - c compiling to a single VFMSUB231SS (or a VFMSUB213SD when using float64)
Go version
go1.26.0
Output of
go envin your module/workspace:What did you do?
Minimal reproduction available here: https://godbolt.org/z/r9PfEeW5d
What did you see happen?
a * b + cgets optimized to a singleVFMADD231SSinstruction, niceHowever a
a * b - ccompiles to aMULSSfollowed by aSUBSSeven though there is a complementary instructionVFMSUB231SSWhat did you expect to see?
The expression
a * b - ccompiling to a singleVFMSUB231SS(or a VFMSUB213SD when using float64)