git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184200
91177308-0d34-0410-b5e6-
96231b3b80d8
return 0;
}
-void BoUpSLP::vectorizeArith(ArrayRef<Value *> Operands) {
+Value *BoUpSLP::vectorizeArith(ArrayRef<Value *> Operands) {
int LastIdx = getLastIndex(Operands, Operands.size());
Instruction *Loc = getInsertionPoint(LastIdx);
Builder.SetInsertPoint(Loc);
Value *S = Builder.CreateExtractElement(Vec, Builder.getInt32(i));
Operands[i]->replaceAllUsesWith(S);
}
+
+ return Vec;
}
int BoUpSLP::getTreeCost(ArrayRef<Value *> VL) {
bool vectorizeStores(ArrayRef<StoreInst *> Stores, int costThreshold);
/// \brief Vectorize a group of scalars into a vector tree.
- void vectorizeArith(ArrayRef<Value *> Operands);
+ Value *vectorizeArith(ArrayRef<Value *> Operands);
/// \returns the list of new instructions that were added in order to collect
/// scalars into vectors. This list can be used to further optimize the gather