From ba25f0924ef3be887fb67ed6a66f3dee77461f44 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Tue, 5 Jan 2010 17:50:58 +0000 Subject: [PATCH] Nick Lewycky pointed out that this code makes changes unconditionally. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92739 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Utils/Local.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Transforms/Utils/Local.cpp b/lib/Transforms/Utils/Local.cpp index 30fe8025135..1a7d27ad45c 100644 --- a/lib/Transforms/Utils/Local.cpp +++ b/lib/Transforms/Utils/Local.cpp @@ -328,7 +328,8 @@ llvm::RecursivelyDeleteDeadPHINode(PHINode *PN) { if (!PHIs.insert(cast(JP))) { // Break the cycle and delete the PHI and its operands. JP->replaceAllUsesWith(UndefValue::get(JP->getType())); - Changed |= RecursivelyDeleteTriviallyDeadInstructions(JP); + (void)RecursivelyDeleteTriviallyDeadInstructions(JP); + Changed = true; break; } return Changed; -- 2.34.1