Skip to content

Commit 861d786

Browse files
committed
Add tests and extra max trip count debug output
1 parent 66b2820 commit 861d786

File tree

3 files changed

+679
-0
lines changed

3 files changed

+679
-0
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3958,6 +3958,8 @@ LoopVectorizationCostModel::computeMaxVF(ElementCount UserVF, unsigned UserIC) {
39583958
unsigned TC = PSE.getSE()->getSmallConstantTripCount(TheLoop);
39593959
unsigned MaxTC = PSE.getSE()->getSmallConstantMaxTripCount(TheLoop);
39603960
LLVM_DEBUG(dbgs() << "LV: Found trip count: " << TC << '\n');
3961+
if (TC != MaxTC)
3962+
LLVM_DEBUG(dbgs() << "LV: Found maximum trip count: " << MaxTC << '\n');
39613963
if (TC == 1) {
39623964
reportVectorizationFailure("Single iteration (non) loop",
39633965
"loop trip count is one, irrelevant for vectorization",

0 commit comments

Comments
 (0)