https://github.com/RKSimon commented: Would we be better off just adding a recursive depth limit (SelectionDAG::MaxRecursionDepth) like we do in other recursive calls? https://github.com/llvm/llvm-project/pull/130226