summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2017-03-05 15:52:18 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2017-03-05 15:52:18 +0000
commit584d6d9d9109ff90aa34d064903ee0d572a7fc5a (patch)
tree62532705cda505baeba9bc16eeeb9643603baca5 /llvm/lib/CodeGen/SelectionDAG
parent495ad0b2a0f091db203747a87bbf5a34fd3f84da (diff)
downloadbcm5719-llvm-584d6d9d9109ff90aa34d064903ee0d572a7fc5a.tar.gz
bcm5719-llvm-584d6d9d9109ff90aa34d064903ee0d572a7fc5a.zip
[SelectionDAG] Fix vector splitting for *_EXTEND_VECTOR_INREG instructions
Found by fuzz testing after rL296985 landed llvm-svn: 296989
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
index 0ddae3648d0..358d4264803 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
@@ -963,7 +963,12 @@ void DAGTypeLegalizer::SplitVecRes_ExtVecInRegOp(SDNode *N, SDValue &Lo,
SDLoc dl(N);
SDValue InLo, InHi;
- GetSplitVector(N0, InLo, InHi);
+
+ if (getTypeAction(N0.getValueType()) == TargetLowering::TypeSplitVector)
+ GetSplitVector(N0, InLo, InHi);
+ else
+ std::tie(InLo, InHi) = DAG.SplitVectorOperand(N, 0);
+
EVT InLoVT = InLo.getValueType();
unsigned InNumElements = InLoVT.getVectorNumElements();
OpenPOWER on IntegriCloud