diff options
| author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2017-03-05 15:52:18 +0000 | 
|---|---|---|
| committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2017-03-05 15:52:18 +0000 | 
| commit | 584d6d9d9109ff90aa34d064903ee0d572a7fc5a (patch) | |
| tree | 62532705cda505baeba9bc16eeeb9643603baca5 /llvm/lib/CodeGen/SelectionDAG | |
| parent | 495ad0b2a0f091db203747a87bbf5a34fd3f84da (diff) | |
| download | bcm5719-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.cpp | 7 | 
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(); | 

