Skip to content

Commit 6dfa95d

Browse files
committed
[X86] X86DAGToDAGISel::matchAddressRecursively - use SelectionDAG::MaxRecursionDepth instead of hard coded constant. NFCI.
SelectionDAG::MaxRecursionDepth has the same max depth (with adjusted comparison).
1 parent 2992d08 commit 6dfa95d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/X86/X86ISelDAGToDAG.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2210,7 +2210,7 @@ bool X86DAGToDAGISel::matchAddressRecursively(SDValue N, X86ISelAddressMode &AM,
22102210
AM.dump(CurDAG);
22112211
});
22122212
// Limit recursion.
2213-
if (Depth > 5)
2213+
if (Depth >= SelectionDAG::MaxRecursionDepth)
22142214
return matchAddressBase(N, AM);
22152215

22162216
// If this is already a %rip relative address, we can only merge immediates

0 commit comments

Comments
 (0)