summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorNadav Rotem <nrotem@apple.com>2012-11-14 00:02:13 +0000
committerNadav Rotem <nrotem@apple.com>2012-11-14 00:02:13 +0000
commita43bcddc8d3a2671eaa627665abcfd4a93497254 (patch)
tree3756ac82a5a665b1b4e091c3f14a05d39d377216 /llvm/lib
parentd7a527c4383ba7bb747e2b3247c26b96cc9979f1 (diff)
downloadbcm5719-llvm-a43bcddc8d3a2671eaa627665abcfd4a93497254.tar.gz
bcm5719-llvm-a43bcddc8d3a2671eaa627665abcfd4a93497254.zip
use the getSplat API. Patch by Paul Redmond.
llvm-svn: 167892
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/Vectorize/LoopVectorize.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index a7ef248e6e3..12e4db6b38f 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -549,13 +549,7 @@ Value *SingleBlockLoopVectorizer::getVectorValue(Value *V) {
Constant*
SingleBlockLoopVectorizer::getUniformVector(unsigned Val, Type* ScalarTy) {
- SmallVector<Constant*, 8> Indices;
- // Create a vector of consecutive numbers from zero to VF.
- for (unsigned i = 0; i < VF; ++i)
- Indices.push_back(ConstantInt::get(ScalarTy, Val, true));
-
- // Add the consecutive indices to the vector value.
- return ConstantVector::get(Indices);
+ return ConstantVector::getSplat(VF, ConstantInt::get(ScalarTy, Val, true));
}
void SingleBlockLoopVectorizer::scalarizeInstruction(Instruction *Instr) {
OpenPOWER on IntegriCloud