diff options
author | Michael Kuperstein <mkuper@google.com> | 2016-10-11 22:44:31 +0000 |
---|---|---|
committer | Michael Kuperstein <mkuper@google.com> | 2016-10-11 22:44:31 +0000 |
commit | 7adbf6b04224425d5db863bb80c7b295cf15c9aa (patch) | |
tree | 518e2f00b7e628bc64ace3a5994a17fc7bf8d10b /llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | |
parent | c1d8c2bf8c497523cb735815681054cacc57597d (diff) | |
download | bcm5719-llvm-7adbf6b04224425d5db863bb80c7b295cf15c9aa.tar.gz bcm5719-llvm-7adbf6b04224425d5db863bb80c7b295cf15c9aa.zip |
[DAG] Fix crash in build_vector -> vector_shuffle combine
Fixes a crash in the build_vector -> vector_shuffle combine
when the first vector input is twice as wide as the output,
and the second input vector is even wider.
llvm-svn: 283953
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index b8dad384f6c..57cee4706d8 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -12955,6 +12955,11 @@ SDValue DAGCombiner::createBuildVecShuffle(SDLoc DL, SDNode *N, VecIn2 = DAG.getNode(ISD::INSERT_SUBVECTOR, DL, InVT1, DAG.getUNDEF(InVT1), VecIn2, ZeroIdx); ShuffleNumElems = NumElems * 2; + } else { + // Both VecIn1 and VecIn2 are wider than the output, and VecIn2 is wider + // than VecIn1. We can't handle this for now - this case will disappear + // when we start sorting the vectors by type. + return SDValue(); } } else { // TODO: Support cases where the length mismatch isn't exactly by a |