Skip to content

Commit 67fd4e3

Browse files
committed
[InstCombine] Check for poison instead of undef in shuffle transform
This one doesn't seem to make a practical difference because we'd canonicalize undef -> poison in the relevant cases anywy.
1 parent f412b78 commit 67fd4e3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -777,10 +777,10 @@ static ShuffleOps collectShuffleElements(Value *V, SmallVectorImpl<int> &Mask,
777777
assert(V->getType()->isVectorTy() && "Invalid shuffle!");
778778
unsigned NumElts = cast<FixedVectorType>(V->getType())->getNumElements();
779779

780-
if (match(V, m_Undef())) {
780+
if (match(V, m_Poison())) {
781781
Mask.assign(NumElts, -1);
782782
return std::make_pair(
783-
PermittedRHS ? UndefValue::get(PermittedRHS->getType()) : V, nullptr);
783+
PermittedRHS ? PoisonValue::get(PermittedRHS->getType()) : V, nullptr);
784784
}
785785

786786
if (isa<ConstantAggregateZero>(V)) {

0 commit comments

Comments
 (0)