diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp index 501f6afd60607..494db0493daca 100644 --- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp +++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp @@ -999,7 +999,7 @@ static void reorderScalars(SmallVectorImpl &Scalars, ArrayRef Mask) { assert(!Mask.empty() && "Expected non-empty mask."); SmallVector Prev(Scalars.size(), - UndefValue::get(Scalars.front()->getType())); + PoisonValue::get(Scalars.front()->getType())); Prev.swap(Scalars); for (unsigned I = 0, E = Prev.size(); I < E; ++I) if (Mask[I] != PoisonMaskElem)