From 688d668e5c18607cbf1832402e0435f1e886f5e4 Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Mon, 3 Jun 2013 23:15:20 +0000 Subject: [PATCH] Delete dead safety check. llvm-svn: 183167 --- llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp b/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp index c76aa4c2e6cf..d43093d83165 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp @@ -820,12 +820,7 @@ Instruction *InstCombiner::visitShuffleVectorInst(ShuffleVectorInst &SVI) { if (isRHSID) return ReplaceInstUsesWith(SVI, RHS); } - if (isa(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(LHS) && - CanEvaluateShuffled(LHS, Mask)) { + if (isa(RHS) && CanEvaluateShuffled(LHS, Mask)) { Value *V = EvaluateInDifferentElementOrder(LHS, Mask); return ReplaceInstUsesWith(SVI, V); }