summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff options
context:
space:
mode:
authorZvi Rackover <zvi.rackover@intel.com>2017-04-03 17:41:19 +0000
committerZvi Rackover <zvi.rackover@intel.com>2017-04-03 17:41:19 +0000
commitd76a4d0ac676f387113f082c06754c42a57ad08e (patch)
tree016b8514971e6a5aa0288e98a966b3148cce5c0f /llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
parent44173f7d02cafb6eb0f9485a92eda36033364b65 (diff)
downloadbcm5719-llvm-d76a4d0ac676f387113f082c06754c42a57ad08e.tar.gz
bcm5719-llvm-d76a4d0ac676f387113f082c06754c42a57ad08e.zip
Revert "[DAGCombine] A shuffle of a splat is always the splat itself"
This reverts commit r299047 which is incorrect because the simplification may result in incorrect propogation of undefs to users of the folded shuffle. Thanks to Andrea Di Biagio for pointing this out. llvm-svn: 299368
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 82c61faaa54..779a0b5c8bd 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -14633,12 +14633,6 @@ SDValue DAGCombiner::visitVECTOR_SHUFFLE(SDNode *N) {
return DAG.getVectorShuffle(VT, SDLoc(N), N0, N1, NewMask);
}
- // A shuffle of a splat is always the splat itself:
- // shuffle (splat-shuffle), undef, M --> splat-shuffle
- if (auto *N0Shuf = dyn_cast<ShuffleVectorSDNode>(N0))
- if (N1.isUndef() && N0Shuf->isSplat())
- return N0;
-
// If it is a splat, check if the argument vector is another splat or a
// build_vector.
if (SVN->isSplat() && SVN->getSplatIndex() < (int)NumElts) {
OpenPOWER on IntegriCloud