forked from OSchip/llvm-project
[X86] Don't check for folding into a store when deciding if we can promote an i16 mul.
There's no RMW mul operation. llvm-svn: 328931
This commit is contained in:
parent
db6caabccc
commit
9b8cd5fe55
|
@ -38755,10 +38755,12 @@ bool X86TargetLowering::IsDesirableToPromoteOp(SDValue Op, EVT &PVT) const {
|
||||||
SDValue N1 = Op.getOperand(1);
|
SDValue N1 = Op.getOperand(1);
|
||||||
// Avoid disabling potential load folding opportunities.
|
// Avoid disabling potential load folding opportunities.
|
||||||
if (MayFoldLoad(N1) &&
|
if (MayFoldLoad(N1) &&
|
||||||
(!Commute || !isa<ConstantSDNode>(N0) || IsFoldableRMW(N1, Op)))
|
(!Commute || !isa<ConstantSDNode>(N0) ||
|
||||||
|
(Op.getOpcode() != ISD::MUL && IsFoldableRMW(N1, Op))))
|
||||||
return false;
|
return false;
|
||||||
if (MayFoldLoad(N0) &&
|
if (MayFoldLoad(N0) &&
|
||||||
((Commute && !isa<ConstantSDNode>(N1)) || IsFoldableRMW(N0, Op)))
|
((Commute && !isa<ConstantSDNode>(N1)) ||
|
||||||
|
(Op.getOpcode() != ISD::MUL && IsFoldableRMW(N0, Op))))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue