summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2013-06-03 23:15:20 +0000
committerNick Lewycky <nicholas@mxc.ca>2013-06-03 23:15:20 +0000
commit688d668e5c18607cbf1832402e0435f1e886f5e4 (patch)
treedc4c0f44b8dd2dc838826c457a8eb526d0d9cc2c /llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
parent5e2b3a30a074c411fb63a3e21f68ea4618333c1c (diff)
downloadbcm5719-llvm-688d668e5c18607cbf1832402e0435f1e886f5e4.tar.gz
bcm5719-llvm-688d668e5c18607cbf1832402e0435f1e886f5e4.zip
Delete dead safety check.
llvm-svn: 183167
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp b/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
index c76aa4c2e6c..d43093d8316 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<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);
}
OpenPOWER on IntegriCloud