/arch:SSE prefers to use fmul?

Lychy 1 Reputation point
2022-04-15T14:27:55.687+00:00

Here's some sample code:
int n = 200;
float x = 0.2;
double z = n * x;

If I were to compile using /arch:SSE, the assembler code uses fmul,
but compiling with /arch:SSE2 results in it using mulss,

How come /arch:SSE doesn't use mulss despite it being an SSE1 instruction?

Developer technologies | C++
Developer technologies | C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.