[llvm] 5e963a2 - Rehome an orphaned comment [NFC]
Sanne Wouda via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 8 08:37:11 PST 2021
Author: Sanne Wouda
Date: 2021-03-08T16:32:30Z
New Revision: 5e963a24415eb88d512eb74c8addf87051f7969a
URL: https://github.com/llvm/llvm-project/commit/5e963a24415eb88d512eb74c8addf87051f7969a
DIFF: https://github.com/llvm/llvm-project/commit/5e963a24415eb88d512eb74c8addf87051f7969a.diff
LOG: 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.
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 06f22cdfb63d..d7474e3072f0 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
@@ -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.
More information about the llvm-commits
mailing list