summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2014-10-11 05:28:30 +0000
committerChandler Carruth <chandlerc@gmail.com>2014-10-11 05:28:30 +0000
commitbff0ae772c748252e31f21150f374e2314e58569 (patch)
tree25d4d1ec2438f2bdae97502944d5b6aad810cdfe /llvm/lib/Transforms
parent8d4fae3d8b695d0d55b258d27fb975f9fc72288d (diff)
downloadbcm5719-llvm-bff0ae772c748252e31f21150f374e2314e58569.tar.gz
bcm5719-llvm-bff0ae772c748252e31f21150f374e2314e58569.zip
[SCEV] Fix one more caller blindly passing the latch to SCEV's
getSmallConstantTripCount even when it isn't the exiting block. I missed this in my first audit, very sorry. This was found in LNT and elsewhere. I don't have a test case, but it was completely obvious from inspection that this was the problem. I'll see if I can reduce a test case, but I'm not really hopeful, and the value seems quite low. llvm-svn: 219562
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Vectorize/LoopVectorize.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index 2004f62a80c..d45b8d8a72b 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -5517,8 +5517,7 @@ LoopVectorizationCostModel::selectUnrollFactor(bool OptForSize,
return 1;
// Do not unroll loops with a relatively small trip count.
- unsigned TC = SE->getSmallConstantTripCount(TheLoop,
- TheLoop->getLoopLatch());
+ unsigned TC = SE->getSmallConstantTripCount(TheLoop);
if (TC > 1 && TC < TinyTripCountUnrollThreshold)
return 1;
OpenPOWER on IntegriCloud