[llvm] r219562 - [SCEV] Fix one more caller blindly passing the latch to SCEV's
Chandler Carruth
chandlerc at gmail.com
Fri Oct 10 22:28:30 PDT 2014
Author: chandlerc
Date: Sat Oct 11 00:28:30 2014
New Revision: 219562
URL: http://llvm.org/viewvc/llvm-project?rev=219562&view=rev
Log:
[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.
Modified:
llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp
Modified: llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp?rev=219562&r1=219561&r2=219562&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp (original)
+++ llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp Sat Oct 11 00:28:30 2014
@@ -5517,8 +5517,7 @@ LoopVectorizationCostModel::selectUnroll
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;
More information about the llvm-commits
mailing list