[llvm] c30da98 - [AArch64] Remove unnecessary CostKindCheck (NFC).
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 1 10:22:35 PDT 2020
Author: Florian Hahn
Date: 2020-07-01T18:20:41+01:00
New Revision: c30da98d478e547428a723354b4fd1e45a7f7003
URL: https://github.com/llvm/llvm-project/commit/c30da98d478e547428a723354b4fd1e45a7f7003
DIFF: https://github.com/llvm/llvm-project/commit/c30da98d478e547428a723354b4fd1e45a7f7003.diff
LOG: [AArch64] Remove unnecessary CostKindCheck (NFC).
Simplification suggested post-commit.
Added:
Modified:
llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp b/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
index e637284e226e..be0c51b83a25 100644
--- a/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
+++ b/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
@@ -473,8 +473,9 @@ unsigned AArch64TTIImpl::getCFInstrCost(unsigned Opcode,
TTI::TargetCostKind CostKind) {
if (CostKind != TTI::TCK_RecipThroughput)
return Opcode == Instruction::PHI ? 0 : 1;
+ assert(CostKind == TTI::TCK_RecipThroughput && "unexpected CostKind");
// Branches are assumed to be predicted.
- return CostKind == TTI::TCK_RecipThroughput ? 0 : 1;
+ return 0;
}
int AArch64TTIImpl::getVectorInstrCost(unsigned Opcode, Type *Val,
More information about the llvm-commits
mailing list