[llvm] 4be3fc3 - [SLP][NFC]Cleanup up operands of the removed insertelements, NFC.
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 30 17:53:01 PDT 2022
Author: Alexey Bataev
Date: 2022-06-30T17:51:43-07:00
New Revision: 4be3fc35aa8b27494968e9a52eb0afa0672d98e7
URL: https://github.com/llvm/llvm-project/commit/4be3fc35aa8b27494968e9a52eb0afa0672d98e7
DIFF: https://github.com/llvm/llvm-project/commit/4be3fc35aa8b27494968e9a52eb0afa0672d98e7.diff
LOG: [SLP][NFC]Cleanup up operands of the removed insertelements, NFC.
Replace all operands of the insertelement instruction, replaced by
shuffles, by poisons to avoid false-positive reports about incorrect function.
Added:
Modified:
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
index a958c36969d53..019a09665a679 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -8827,6 +8827,8 @@ BoUpSLP::vectorizeTree(ExtraValueToDebugLocsMap &ExternallyUsedValues) {
}
LastInsert->replaceAllUsesWith(NewInst);
for (InsertElementInst *IE : reverse(ShuffledInserts[I].InsertElements)) {
+ IE->replaceUsesOfWith(IE->getOperand(0),
+ PoisonValue::get(IE->getOperand(0)->getType()));
IE->replaceUsesOfWith(IE->getOperand(1),
PoisonValue::get(IE->getOperand(1)->getType()));
eraseInstruction(IE);
More information about the llvm-commits
mailing list