From d76a4d0ac676f387113f082c06754c42a57ad08e Mon Sep 17 00:00:00 2001 From: Zvi Rackover Date: Mon, 3 Apr 2017 17:41:19 +0000 Subject: 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 --- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 6 ------ 1 file changed, 6 deletions(-) (limited to 'llvm/lib/CodeGen/SelectionDAG') 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(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) { -- cgit v1.2.3