================ @@ -62,15 +62,15 @@ bool InstCombinerImpl::foldDeadPhiWeb(PHINode &PN) { Stack.push_back(&PN); ---------------- nikic wrote: We should also add the initial phi node to the Visited set. https://github.com/llvm/llvm-project/pull/158057