diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp --- a/llvm/lib/Transforms/Utils/Local.cpp +++ b/llvm/lib/Transforms/Utils/Local.cpp @@ -2896,9 +2896,9 @@ for (Use &U : llvm::make_early_inc_range(From->uses())) { if (!Dominates(Root, U)) continue; - U.set(To); LLVM_DEBUG(dbgs() << "Replace dominated use of '" << From->getName() - << "' as " << *To << " in " << *U << "\n"); + << "' as " << *To << " in " << *U.getUser() << "\n"); + U.set(To); ++Count; } return Count;