summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
diff options
context:
space:
mode:
authorJordan Rupprecht <rupprecht@google.com>2019-07-01 23:29:46 +0000
committerJordan Rupprecht <rupprecht@google.com>2019-07-01 23:29:46 +0000
commit351b7e7b241cb38c72ee61b5c11b9aaf7fe95eb7 (patch)
treede4b2def4277b49f1f0007c6a56740cf26ecf966 /llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
parent121401425d4d56eb6faed74c0307d161e77f7434 (diff)
downloadbcm5719-llvm-351b7e7b241cb38c72ee61b5c11b9aaf7fe95eb7.tar.gz
bcm5719-llvm-351b7e7b241cb38c72ee61b5c11b9aaf7fe95eb7.zip
Revert Recommit [PowerPC] Update P9 vector costs for insert/extract element
This reverts r364557 (git commit 9f7f5858fe46b8e706e87a83e2fd0a2678be619e) This crashes as reported on the commit thread. Repro instructions TBD. llvm-svn: 364876
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp')
-rw-r--r--llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp29
1 files changed, 0 insertions, 29 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp b/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
index 42ba5cb9f19..5d791a76610 100644
--- a/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
+++ b/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
@@ -752,35 +752,6 @@ int PPCTTIImpl::getVectorInstrCost(unsigned Opcode, Type *Val, unsigned Index) {
return 0;
return Cost;
-
- } else if (Val->getScalarType()->isIntegerTy() && Index != -1U) {
- if (ST->hasP9Altivec()) {
- if (ISD == ISD::INSERT_VECTOR_ELT)
- // A move-to VSR and a permute/insert. Assume vector operation cost
- // for both (cost will be 2x on P9).
- return vectorCostAdjustment(2, Opcode, Val, nullptr);
-
- // It's an extract. Maybe we can do a cheap move-from VSR.
- unsigned EltSize = Val->getScalarSizeInBits();
- if (EltSize == 64) {
- unsigned MfvsrdIndex = ST->isLittleEndian() ? 1 : 0;
- if (Index == MfvsrdIndex)
- return 1;
- } else if (EltSize == 32) {
- unsigned MfvsrwzIndex = ST->isLittleEndian() ? 2 : 1;
- if (Index == MfvsrwzIndex)
- return 1;
- }
-
- // We need a vector extract (or mfvsrld). Assume vector operation cost.
- // The cost of the load constant for a vector extract is disregarded
- // (invariant, easily schedulable).
- return vectorCostAdjustment(1, Opcode, Val, nullptr);
-
- } else if (ST->hasDirectMove())
- // Assume permute has standard cost.
- // Assume move-to/move-from VSR have 2x standard cost.
- return 3;
}
// Estimated cost of a load-hit-store delay. This was obtained
OpenPOWER on IntegriCloud