diff options
| author | Daniel Jasper <djasper@google.com> | 2017-10-13 14:04:21 +0000 |
|---|---|---|
| committer | Daniel Jasper <djasper@google.com> | 2017-10-13 14:04:21 +0000 |
| commit | 3344a21236837f9920eca7439656a1127f937862 (patch) | |
| tree | b20e3f9322e813469e7916eef940a98eca57180e /llvm/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp | |
| parent | 9a26a7ec331e01fdf2a9438eff10d901420c1c27 (diff) | |
| download | bcm5719-llvm-3344a21236837f9920eca7439656a1127f937862.tar.gz bcm5719-llvm-3344a21236837f9920eca7439656a1127f937862.zip | |
Revert r314923: "Recommit : Use the basic cost if a GEP is not used as addressing mode"
Significantly reduces performancei (~30%) of gipfeli
(https://github.com/google/gipfeli)
I have not yet managed to reproduce this regression with the open-source
version of the benchmark on github, but will work with others to get a
reproducer to you later today.
llvm-svn: 315680
Diffstat (limited to 'llvm/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp b/llvm/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp index 3f93eaecc5d..8b8d6590aa6 100644 --- a/llvm/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp +++ b/llvm/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp @@ -239,7 +239,7 @@ static bool isGEPFoldable(GetElementPtrInst *GEP, SmallVector<const Value*, 4> Indices; for (auto I = GEP->idx_begin(); I != GEP->idx_end(); ++I) Indices.push_back(*I); - return TTI->getGEPCost(cast<GEPOperator>(GEP), + return TTI->getGEPCost(GEP->getSourceElementType(), GEP->getPointerOperand(), Indices) == TargetTransformInfo::TCC_Free; } |

