Skip to content

Commit 8263bec

Browse files
authored
[SLP] Use poison instead of undef in reorderScalars() (#96619)
-1 mask elements are specified to return poison rather than undef nowadays , so update the reorderScalars() implementation to match.
1 parent 0f111ba commit 8263bec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,7 @@ static void reorderScalars(SmallVectorImpl<Value *> &Scalars,
999999
ArrayRef<int> Mask) {
10001000
assert(!Mask.empty() && "Expected non-empty mask.");
10011001
SmallVector<Value *> Prev(Scalars.size(),
1002-
UndefValue::get(Scalars.front()->getType()));
1002+
PoisonValue::get(Scalars.front()->getType()));
10031003
Prev.swap(Scalars);
10041004
for (unsigned I = 0, E = Prev.size(); I < E; ++I)
10051005
if (Mask[I] != PoisonMaskElem)

0 commit comments

Comments
 (0)