1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00

Remove the optimize for code size limitation on r67917. Optimize 64-bit imul by constants into leas + shl regardless if optimizing for code size. The size saving from using imulq isn't worth it. Also, the lea and shl instructions may expose further optimization.

llvm-svn: 97507
This commit is contained in:
Evan Cheng 2010-03-01 22:00:11 +00:00
parent 7cc2cd25c4
commit c0a816fd16

View File

@ -9233,10 +9233,6 @@ static SDValue PerformANDCombine(SDNode *N, SelectionDAG &DAG,
/// LEA + SHL, LEA + LEA. /// LEA + SHL, LEA + LEA.
static SDValue PerformMulCombine(SDNode *N, SelectionDAG &DAG, static SDValue PerformMulCombine(SDNode *N, SelectionDAG &DAG,
TargetLowering::DAGCombinerInfo &DCI) { TargetLowering::DAGCombinerInfo &DCI) {
if (DAG.getMachineFunction().
getFunction()->hasFnAttr(Attribute::OptimizeForSize))
return SDValue();
if (DCI.isBeforeLegalize() || DCI.isCalledByLegalizer()) if (DCI.isBeforeLegalize() || DCI.isCalledByLegalizer())
return SDValue(); return SDValue();