Delete dead safety check.

llvm-svn: 183167
This commit is contained in:
Nick Lewycky 2013-06-03 23:15:20 +00:00
parent 5e2b3a30a0
commit 688d668e5c
1 changed files with 1 additions and 6 deletions

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);
}