Rehome an orphaned comment [NFC]

As seen in 35827164c4, the "shuffle x, x, mask" comment has drifted away
from the implementation of the pattern. Put it back.
This commit is contained in:
Sanne Wouda 2021-02-19 16:59:33 +00:00
parent dc4ca9b0d4
commit 5e963a2441
1 changed files with 1 additions and 1 deletions

View File

@ -2287,7 +2287,6 @@ Instruction *InstCombinerImpl::visitShuffleVectorInst(ShuffleVectorInst &SVI) {
if (isa<ScalableVectorType>(LHS->getType()))
return nullptr;
// shuffle x, x, mask --> shuffle x, undef, mask'
unsigned VWidth = cast<FixedVectorType>(SVI.getType())->getNumElements();
unsigned LHSWidth = cast<FixedVectorType>(LHS->getType())->getNumElements();
ArrayRef<int> Mask = SVI.getShuffleMask();
@ -2323,6 +2322,7 @@ Instruction *InstCombinerImpl::visitShuffleVectorInst(ShuffleVectorInst &SVI) {
}
}
// shuffle x, x, mask --> shuffle x, undef, mask'
if (LHS == RHS) {
assert(!isa<UndefValue>(RHS) && "Shuffle with 2 undef ops not simplified?");
// Remap any references to RHS to use LHS.