Skip to content

Commit 530d4c9

Browse files
committed
[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.
1 parent 7c640d1 commit 530d4c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1319,7 +1319,7 @@ static Instruction *foldInsEltIntoSplat(InsertElementInst &InsElt) {
13191319
static Instruction *foldInsEltIntoIdentityShuffle(InsertElementInst &InsElt) {
13201320
// Check if the vector operand of this insert is an identity shuffle.
13211321
auto *Shuf = dyn_cast<ShuffleVectorInst>(InsElt.getOperand(0));
1322-
if (!Shuf || !match(Shuf->getOperand(1), m_Undef()) ||
1322+
if (!Shuf || !match(Shuf->getOperand(1), m_Poison()) ||
13231323
!(Shuf->isIdentityWithExtract() || Shuf->isIdentityWithPadding()))
13241324
return nullptr;
13251325

0 commit comments

Comments
 (0)