From 5e963a24415eb88d512eb74c8addf87051f7969a Mon Sep 17 00:00:00 2001 From: Sanne Wouda Date: Fri, 19 Feb 2021 16:59:33 +0000 Subject: [PATCH] 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. --- llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp b/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp index 06f22cd..d7474e3 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(LHS->getType())) return nullptr; - // shuffle x, x, mask --> shuffle x, undef, mask' unsigned VWidth = cast(SVI.getType())->getNumElements(); unsigned LHSWidth = cast(LHS->getType())->getNumElements(); ArrayRef 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(RHS) && "Shuffle with 2 undef ops not simplified?"); // Remap any references to RHS to use LHS. -- 2.7.4