Delete dead safety check.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183167 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Nick Lewycky 2013-06-03 23:15:20 +00:00
parent 3931bdb788
commit 4526d1cd4a

View File

@ -820,12 +820,7 @@ Instruction *InstCombiner::visitShuffleVectorInst(ShuffleVectorInst &SVI) {
if (isRHSID) return ReplaceInstUsesWith(SVI, RHS);
}
if (isa<UndefValue>(RHS) &&
// This isn't necessary for correctness, but the comment block below
// claims that there are cases where folding two shuffles into one would
// cause worse codegen on some targets.
!isa<ShuffleVectorInst>(LHS) &&
CanEvaluateShuffled(LHS, Mask)) {
if (isa<UndefValue>(RHS) && CanEvaluateShuffled(LHS, Mask)) {
Value *V = EvaluateInDifferentElementOrder(LHS, Mask);
return ReplaceInstUsesWith(SVI, V);
}