Skip to content

Commit 618a399

Browse files
authored
[InstCombine] Explicitly match poison operand. NFCI (#141744)
This is a follow up from #141300 (comment)
1 parent 3d0f885 commit 618a399

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1422,7 +1422,7 @@ InstCombinerImpl::foldShuffledIntrinsicOperands(IntrinsicInst *II) {
14221422
ArrayRef<int> Mask;
14231423
auto *NonConstArg = find_if_not(II->args(), IsaPred<Constant>);
14241424
if (!NonConstArg ||
1425-
!match(NonConstArg, m_Shuffle(m_Value(X), m_Undef(), m_Mask(Mask))))
1425+
!match(NonConstArg, m_Shuffle(m_Value(X), m_Poison(), m_Mask(Mask))))
14261426
return nullptr;
14271427

14281428
// At least 1 operand must have 1 use because we are creating 2 instructions.
@@ -1433,7 +1433,7 @@ InstCombinerImpl::foldShuffledIntrinsicOperands(IntrinsicInst *II) {
14331433
SmallVector<Value *, 4> NewArgs;
14341434
Type *SrcTy = X->getType();
14351435
for (Value *Arg : II->args()) {
1436-
if (match(Arg, m_Shuffle(m_Value(X), m_Undef(), m_SpecificMask(Mask))) &&
1436+
if (match(Arg, m_Shuffle(m_Value(X), m_Poison(), m_SpecificMask(Mask))) &&
14371437
X->getType() == SrcTy)
14381438
NewArgs.push_back(X);
14391439
else if (match(Arg, m_ImmConstant(C))) {

0 commit comments

Comments
 (0)