[llvm] a4d55a2 - [X86] combineX86ShufflesRecursively - assert the root mask is legal. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 23 07:36:13 PDT 2019
Author: Simon Pilgrim
Date: 2019-10-23T07:33:29-07:00
New Revision: a4d55a2c3607c411a16a01a61bd667a03fee7264
URL: https://github.com/llvm/llvm-project/commit/a4d55a2c3607c411a16a01a61bd667a03fee7264
DIFF: https://github.com/llvm/llvm-project/commit/a4d55a2c3607c411a16a01a61bd667a03fee7264.diff
LOG: [X86] combineX86ShufflesRecursively - assert the root mask is legal. NFCI.
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 ed975e9248a8..9e6285845713 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;
More information about the llvm-commits
mailing list