[llvm] [SLP] Use poison instead of undef in reorderScalars() (PR #96619)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 25 03:53:40 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-transforms
Author: Nikita Popov (nikic)
<details>
<summary>Changes</summary>
-1 mask elements are specified to return poison rather than undef nowadays , so update the reorderScalars() implementation to match.
This doesn't cause any actual test changes. Putting up a PR for this just in case there is some SLP-specific divergence I'm not aware of.
---
Full diff: https://github.com/llvm/llvm-project/pull/96619.diff
1 Files Affected:
- (modified) llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp (+1-1)
``````````diff
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<Value *> &Scalars,
ArrayRef<int> Mask) {
assert(!Mask.empty() && "Expected non-empty mask.");
SmallVector<Value *> 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)
``````````
</details>
https://github.com/llvm/llvm-project/pull/96619
More information about the llvm-commits
mailing list