[CostModel][X86] Recursive call for cost of imul for packed v16i16 constant shift left.
Don't just assume cost = 1. llvm-svn: 330834
This commit is contained in:
parent
ef4ece75fd
commit
58e03a09db
|
@ -492,7 +492,9 @@ int X86TTIImpl::getArithmeticInstrCost(
|
|||
Op2Info == TargetTransformInfo::OK_NonUniformConstantValue))
|
||||
// On AVX2, a packed v16i16 shift left by a constant build_vector
|
||||
// is lowered into a vector multiply (vpmullw).
|
||||
return LT.first;
|
||||
return getArithmeticInstrCost(Instruction::Mul, Ty, Op1Info, Op2Info,
|
||||
TargetTransformInfo::OP_None,
|
||||
TargetTransformInfo::OP_None);
|
||||
|
||||
if (const auto *Entry = CostTableLookup(AVX2ShiftCostTable, ISD, LT.second))
|
||||
return LT.first * Entry->Cost;
|
||||
|
|
Loading…
Reference in New Issue