[llvm] e8d9794 - [X86] Don't limit splitVector helper to simple types.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sun May 3 04:29:40 PDT 2020
Author: Simon Pilgrim
Date: 2020-05-03T12:27:37+01:00
New Revision: e8d9794a23548e5aec909de201d449378237b385
URL: https://github.com/llvm/llvm-project/commit/e8d9794a23548e5aec909de201d449378237b385
DIFF: https://github.com/llvm/llvm-project/commit/e8d9794a23548e5aec909de201d449378237b385.diff
LOG: [X86] Don't limit splitVector helper to simple types.
It can handle EVT just as well (and so can the extractSubVector calls).
Added:
Modified:
llvm/lib/Target/X86/X86ISelLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index 3db6a9173fb2..b3c1a755af7b 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<SDValue> &Ops) {
static std::pair<SDValue, SDValue> 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);
}
More information about the llvm-commits
mailing list