[llvm] 530d4c9 - [InstCombine] Use m_Poison() instead of m_Undef() (NFCI)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue May 21 07:15:38 PDT 2024
Author: Nikita Popov
Date: 2024-05-21T16:15:30+02:00
New Revision: 530d4c9bf3d963f51375a1d7afb32f439d9c94a9
URL: https://github.com/llvm/llvm-project/commit/530d4c9bf3d963f51375a1d7afb32f439d9c94a9
DIFF: https://github.com/llvm/llvm-project/commit/530d4c9bf3d963f51375a1d7afb32f439d9c94a9.diff
LOG: [InstCombine] Use m_Poison() instead of m_Undef() (NFCI)
In this case the shuffle mask checks should already guarantee a
single-source shuffle, so this is just for clarity.
Added:
Modified:
llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp b/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
index 9a4230999e471..244f099f06542 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
@@ -1319,7 +1319,7 @@ static Instruction *foldInsEltIntoSplat(InsertElementInst &InsElt) {
static Instruction *foldInsEltIntoIdentityShuffle(InsertElementInst &InsElt) {
// Check if the vector operand of this insert is an identity shuffle.
auto *Shuf = dyn_cast<ShuffleVectorInst>(InsElt.getOperand(0));
- if (!Shuf || !match(Shuf->getOperand(1), m_Undef()) ||
+ if (!Shuf || !match(Shuf->getOperand(1), m_Poison()) ||
!(Shuf->isIdentityWithExtract() || Shuf->isIdentityWithPadding()))
return nullptr;
More information about the llvm-commits
mailing list