Optimizing: Use more X86 3 operand multiplies
The X86_64 code generator generated 3 operand multiplies for long
multiplication only. Add support for 3 operand multiplication for
int as well for both X86 and X86_64.
Note that the RHS operand must be a 32 bit constant, and that it is
possible for the constant to end up in a register (!) due to a previous
use by another instruction. Handle this case by checking the operand,
otherwise the first input might not be the same as the output, due to
the use of Any().
Also allow stack operands for multiplication.
Signed-off-by: Mark Mendell <firstname.lastname@example.org>
6 files changed