From e8d9794a23548e5aec909de201d449378237b385 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Sun, 3 May 2020 12:27:14 +0100 Subject: [PATCH] [X86] Don't limit splitVector helper to simple types. It can handle EVT just as well (and so can the extractSubVector calls). --- llvm/lib/Target/X86/X86ISelLowering.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index 3db6a9173fb20..b3c1a755af7be 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -5751,13 +5751,14 @@ static bool collectConcatOps(SDNode *N, SmallVectorImpl &Ops) { static std::pair splitVector(SDValue Op, SelectionDAG &DAG, const SDLoc &dl) { - MVT VT = Op.getSimpleValueType(); + EVT VT = Op.getValueType(); unsigned NumElems = VT.getVectorNumElements(); unsigned SizeInBits = VT.getSizeInBits(); + assert((NumElems % 2) == 0 && (SizeInBits % 2) == 0 && + "Can't split odd sized vector"); SDValue Lo = extractSubVector(Op, 0, DAG, dl, SizeInBits / 2); SDValue Hi = extractSubVector(Op, NumElems / 2, DAG, dl, SizeInBits / 2); - return std::make_pair(Lo, Hi); }