aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Vectorize
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms/Vectorize')
-rw-r--r--lib/Transforms/Vectorize/SLPVectorizer.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Transforms/Vectorize/SLPVectorizer.cpp b/lib/Transforms/Vectorize/SLPVectorizer.cpp
index 0313e98..93376af 100644
--- a/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -1141,10 +1141,9 @@ Value *BoUpSLP::vectorizeTree(TreeEntry *E) {
VectorType *VecTy = VectorType::get(ScalarTy, E->Scalars.size());
if (E->NeedToGather) {
- BasicBlock *BB = VL0->getParent();
BasicBlock::iterator NextInst = getLastInstruction(E->Scalars);
++NextInst;
- assert(NextInst != BB->end());
+ assert(NextInst != VL0->getParent()->end());
Builder.SetInsertPoint(NextInst);
return Gather(E->Scalars, VecTy);
}
@@ -1270,7 +1269,7 @@ Value *BoUpSLP::vectorizeTree(TreeEntry *E) {
if (Value *V = alreadyVectorized(E->Scalars))
return V;
-
+
Value *V = Builder.CreateSelect(Cond, True, False);
E->VectorizedValue = V;
return V;