[llvm] [DAGCombiner] Limit steps in shouldCombineToPostInc (PR #116030)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 13 09:23:06 PST 2024


================
@@ -19089,7 +19089,8 @@ static bool shouldCombineToPostInc(SDNode *N, SDValue Ptr, SDNode *PtrUse,
                                    IsMasked, OtherPtr, TLI)) {
         SmallVector<const SDNode *, 2> Worklist;
         Worklist.push_back(Use);
-        if (SDNode::hasPredecessorHelper(N, Visited, Worklist))
+        constexpr unsigned int MaxSteps = 8192;
----------------
arsenm wrote:

Big number to repeat multiple times. Move these to a common constant? 

https://github.com/llvm/llvm-project/pull/116030


More information about the llvm-commits mailing list