summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2019-10-23 07:33:29 -0700
committerSimon Pilgrim <llvm-dev@redking.me.uk>2019-10-23 07:33:29 -0700
commita4d55a2c3607c411a16a01a61bd667a03fee7264 (patch)
tree233776a9d28679f7027520270b8dc689a00e7e7e /llvm/lib/Target
parenta9c3c176ad741b9c2b915abc59dd977d0299c53f (diff)
downloadbcm5719-llvm-a4d55a2c3607c411a16a01a61bd667a03fee7264.tar.gz
bcm5719-llvm-a4d55a2c3607c411a16a01a61bd667a03fee7264.zip
[X86] combineX86ShufflesRecursively - assert the root mask is legal. NFCI.
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/X86/X86ISelLowering.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index ed975e9248a..9e628584571 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -33026,6 +33026,9 @@ static SDValue combineX86ShufflesRecursively(
ArrayRef<int> RootMask, ArrayRef<const SDNode *> SrcNodes, unsigned Depth,
bool HasVariableMask, bool AllowVariableMask, SelectionDAG &DAG,
const X86Subtarget &Subtarget) {
+ assert(RootMask.size() > 0 && (RootMask.size() > 1 || RootMask[0] == 0) &&
+ "Illegal shuffle root mask");
+
// Bound the depth of our recursive combine because this is ultimately
// quadratic in nature.
const unsigned MaxRecursionDepth = 8;
OpenPOWER on IntegriCloud