[llvm] 27d4f22 - [X86] X86DAGToDAGISel::matchIndexRecursively - replace hard coded recursion limit with SelectionDAG::MaxRecursionDepth. NFCI.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 20 06:52:12 PDT 2023


Author: Simon Pilgrim
Date: 2023-09-20T14:52:01+01:00
New Revision: 27d4f229ad10449f25168e977ef1dd21aca5687f

URL: https://github.com/llvm/llvm-project/commit/27d4f229ad10449f25168e977ef1dd21aca5687f
DIFF: https://github.com/llvm/llvm-project/commit/27d4f229ad10449f25168e977ef1dd21aca5687f.diff

LOG: [X86] X86DAGToDAGISel::matchIndexRecursively - replace hard coded recursion limit with SelectionDAG::MaxRecursionDepth. NFCI.

Added: 
    

Modified: 
    llvm/lib/Target/X86/X86ISelDAGToDAG.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp b/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
index fa5874833c33d17..f4cf9ddfe829532 100644
--- a/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
+++ b/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
@@ -2700,7 +2700,7 @@ bool X86DAGToDAGISel::matchVectorAddressRecursively(SDValue N,
     AM.dump(CurDAG);
   });
   // Limit recursion.
-  if (Depth > 5)
+  if (Depth >= SelectionDAG::MaxRecursionDepth)
     return matchAddressBase(N, AM);
 
   // TODO: Support other operations.


        


More information about the llvm-commits mailing list