aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Vectorize/LoopVectorize.cpp
diff options
context:
space:
mode:
authorNadav Rotem <nrotem@apple.com>2013-01-15 18:25:16 +0000
committerNadav Rotem <nrotem@apple.com>2013-01-15 18:25:16 +0000
commit6a459e65c8bd90e8381361379255ebfb9552b5cf (patch)
tree0638c0d41f205aa8587cccc10be70909c535111f /lib/Transforms/Vectorize/LoopVectorize.cpp
parent0b198ca38f9f58858ad8aa4bf91a2a06a6dee0e5 (diff)
LoopVectorizer cost model. Honor the user command line flag that selects the vectorization factor even if the target machine does not have any vector registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172544 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Vectorize/LoopVectorize.cpp')
-rw-r--r--lib/Transforms/Vectorize/LoopVectorize.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Vectorize/LoopVectorize.cpp b/lib/Transforms/Vectorize/LoopVectorize.cpp
index 464ed97506..bc8e1217be 100644
--- a/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -2633,7 +2633,7 @@ LoopVectorizationCostModel::selectVectorizationFactor(bool OptForSize,
if (MaxVectorSize == 0) {
DEBUG(dbgs() << "LV: The target has no vector registers.\n");
- return 1;
+ MaxVectorSize = 1;
}
assert(MaxVectorSize <= 32 && "Did not expect to pack so many elements"