aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/X86/X86TargetTransformInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/X86/X86TargetTransformInfo.cpp')
-rw-r--r--llvm/lib/Target/X86/X86TargetTransformInfo.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/llvm/lib/Target/X86/X86TargetTransformInfo.cpp b/llvm/lib/Target/X86/X86TargetTransformInfo.cpp
index 413b543..34ba46f 100644
--- a/llvm/lib/Target/X86/X86TargetTransformInfo.cpp
+++ b/llvm/lib/Target/X86/X86TargetTransformInfo.cpp
@@ -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.