From: Nadav Rotem Date: Tue, 15 Jan 2013 18:25:16 +0000 (+0000) Subject: LoopVectorizer cost model. Honor the user command line flag that selects the vectoriz... X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6a459e65c8bd90e8381361379255ebfb9552b5cf;p=oota-llvm.git 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 --- diff --git a/lib/Transforms/Vectorize/LoopVectorize.cpp b/lib/Transforms/Vectorize/LoopVectorize.cpp index 464ed97506f..bc8e1217bea 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"