diff options
| author | Chandler Carruth <chandlerc@gmail.com> | 2017-02-06 21:27:12 +0000 |
|---|---|---|
| committer | Chandler Carruth <chandlerc@gmail.com> | 2017-02-06 21:27:12 +0000 |
| commit | cd07efc793ce6571061c60a25238b2c74a28e409 (patch) | |
| tree | f28638e7028666dcf3266b3e5ad5973516aa54ea /llvm | |
| parent | e69e73c7b82f8c43c7890f1602760e2b61feacb6 (diff) | |
| download | bcm5719-llvm-cd07efc793ce6571061c60a25238b2c74a28e409.tar.gz bcm5719-llvm-cd07efc793ce6571061c60a25238b2c74a28e409.zip | |
[SCEV] Scale back the test added in r294181 as it goes quadratic in
SCEV.
This test was immediately the slowest test in 'check-llvm' even in an
optimized build and was driving up the total test time by 50% for me.
Sanjoy has filed a PR about the quadratic behavior in SCEV but it is
also concerning that the test still passes given that r294181 added
a threshold at 32 to SCEV. I've followed up on the original patch to
figure out how this test should work long-term, but for now I want to
get check-llvm to be fast again.
llvm-svn: 294241
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/unittests/Analysis/ScalarEvolutionTest.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/unittests/Analysis/ScalarEvolutionTest.cpp b/llvm/unittests/Analysis/ScalarEvolutionTest.cpp index 52368a89884..a9b144c5011 100644 --- a/llvm/unittests/Analysis/ScalarEvolutionTest.cpp +++ b/llvm/unittests/Analysis/ScalarEvolutionTest.cpp @@ -549,7 +549,11 @@ TEST_F(ScalarEvolutionsTest, SCEVAddExpr) { Instruction *Add1 = BinaryOperator::CreateAdd(Mul1, Trunc, "", EntryBB); Mul1 = BinaryOperator::CreateMul(Add1, Trunc, "", EntryBB); Instruction *Add2 = BinaryOperator::CreateAdd(Mul1, Add1, "", EntryBB); - for (int i = 0; i < 1000; i++) { + // FIXME: The size of this is arbitrary and doesn't seem to change the + // result, but SCEV will do quadratic work for these so a large number here + // will be extremely slow. We should revisit what and how this is testing + // SCEV. + for (int i = 0; i < 10; i++) { Mul1 = BinaryOperator::CreateMul(Add2, Add1, "", EntryBB); Add1 = Add2; Add2 = BinaryOperator::CreateAdd(Mul1, Add1, "", EntryBB); |

