Limit LLVM's getTargetShuffleInputs() recursion depth

This prevents stack overflow in the dEQP-VK test mentioned below.
The fix also landed upstream as part of https://github.com/llvm/llvm-project/issues/52960.

Bug: b/207118262
Test: dEQP-VK.spirv_assembly.instruction.compute.opphi.wide
Change-Id: I11ce36ed728b37b03f3a623f258177634b90da0e
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/60148
Reviewed-by: Alexis Hétu <sugoi@google.com>
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>
diff --git a/third_party/llvm-10.0/llvm/lib/Target/X86/X86ISelLowering.cpp b/third_party/llvm-10.0/llvm/lib/Target/X86/X86ISelLowering.cpp
index cbdd713..215898d 100644
--- a/third_party/llvm-10.0/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/third_party/llvm-10.0/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -7122,6 +7122,9 @@
                                SmallVectorImpl<SDValue> &Ops,
                                SelectionDAG &DAG, unsigned Depth,
                                bool ResolveKnownElts) {
+  if (Depth > SelectionDAG::MaxRecursionDepth)
+    return false;
+
   Mask.clear();
   Ops.clear();