[X86] combineMul - move MUL_IMM comment inside function. NFC.

combineMul is now used for other things as well as the mul-with-constant expansion - move the comment to where its actually relevant.
This commit is contained in:
Simon Pilgrim 2021-08-22 18:27:03 +01:00
parent 07d44cc0b1
commit 805fb1f6c1
1 changed files with 3 additions and 2 deletions

View File

@ -44061,8 +44061,6 @@ static SDValue combineMulToPMULDQ(SDNode *N, SelectionDAG &DAG,
return SDValue();
}
/// Optimize a single multiply with constant into two operations in order to
/// implement it with two cheaper instructions, e.g. LEA + SHL, LEA + LEA.
static SDValue combineMul(SDNode *N, SelectionDAG &DAG,
TargetLowering::DAGCombinerInfo &DCI,
const X86Subtarget &Subtarget) {
@ -44077,8 +44075,11 @@ static SDValue combineMul(SDNode *N, SelectionDAG &DAG,
if (DCI.isBeforeLegalize() && VT.isVector())
return reduceVMULWidth(N, DAG, Subtarget);
// Optimize a single multiply with constant into two operations in order to
// implement it with two cheaper instructions, e.g. LEA + SHL, LEA + LEA.
if (!MulConstantOptimization)
return SDValue();
// An imul is usually smaller than the alternative sequence.
if (DAG.getMachineFunction().getFunction().hasMinSize())
return SDValue();