[CostModel][X86] getIntrinsicInstrCost - lrint/llrint costs can use getCastInstrCost without argument data
We don't use the IntrinsicCostAttributes arguments so, which allows us to use in type-only analysis in a future patch.
This commit is contained in:
parent
990837f91d
commit
1fa56038f6
@ -4482,15 +4482,13 @@ X86TTIImpl::getIntrinsicInstrCost(const IntrinsicCostAttributes &ICA,
|
||||
}
|
||||
break;
|
||||
case Intrinsic::lrint:
|
||||
case Intrinsic::llrint:
|
||||
case Intrinsic::llrint: {
|
||||
// X86 can use the CVTP2SI instructions to lower lrint/llrint calls, which
|
||||
// have the same costs as the CVTTP2SI (fptosi) instructions
|
||||
if (!ICA.isTypeBasedOnly()) {
|
||||
const SmallVectorImpl<Type *> &ArgTys = ICA.getArgTypes();
|
||||
return getCastInstrCost(Instruction::FPToSI, RetTy, ArgTys[0],
|
||||
TTI::CastContextHint::None, CostKind);
|
||||
}
|
||||
break;
|
||||
const SmallVectorImpl<Type *> &ArgTys = ICA.getArgTypes();
|
||||
return getCastInstrCost(Instruction::FPToSI, RetTy, ArgTys[0],
|
||||
TTI::CastContextHint::None, CostKind);
|
||||
}
|
||||
case Intrinsic::maxnum:
|
||||
case Intrinsic::minnum:
|
||||
// FMINNUM has same costs so don't duplicate.
|
||||
|
Loading…
x
Reference in New Issue
Block a user