From 4526d1cd4a4238f67710f98a1e44688b99fc3ba7 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183167 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/InstCombine/InstCombineVectorOps.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/Transforms/InstCombine/InstCombineVectorOps.cpp b/lib/Transforms/InstCombine/InstCombineVectorOps.cpp index c76aa4c2e6c..d43093d8316 100644 --- a/lib/Transforms/InstCombine/InstCombineVectorOps.cpp +++ b/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); }