diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2025-01-24 09:11:57 +0000 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2025-01-24 09:12:07 +0000 |
commit | 1fa56038f6ea2b35e7b51d8151cfe7dfcb3abcf3 (patch) | |
tree | 4873a9c219d0ff223ccd8cebf1762b9df7950f2f /llvm | |
parent | 990837f91de329b1e045f90fadb86ffe21611d9a (diff) | |
download | llvm-1fa56038f6ea2b35e7b51d8151cfe7dfcb3abcf3.zip llvm-1fa56038f6ea2b35e7b51d8151cfe7dfcb3abcf3.tar.gz llvm-1fa56038f6ea2b35e7b51d8151cfe7dfcb3abcf3.tar.bz2 |
[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.
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/lib/Target/X86/X86TargetTransformInfo.cpp | 12 |
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. |