Delete dead safety check.
authorNick Lewycky <nicholas@mxc.ca>
Mon, 3 Jun 2013 23:15:20 +0000 (23:15 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Mon, 3 Jun 2013 23:15:20 +0000 (23:15 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183167 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/InstCombine/InstCombineVectorOps.cpp

index c76aa4c2e6cff24e0ed417033fe83f6516ef71c1..d43093d8316518686d38eb74d73022fef6ab062e 100644 (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);
   }