[llvm-commits] [llvm] r92739 - /llvm/trunk/lib/Transforms/Utils/Local.cpp
Dan Gohman
gohman at apple.com
Tue Jan 5 09:50:58 PST 2010
Author: djg
Date: Tue Jan 5 11:50:58 2010
New Revision: 92739
URL: http://llvm.org/viewvc/llvm-project?rev=92739&view=rev
Log:
Nick Lewycky pointed out that this code makes changes unconditionally.
Modified:
llvm/trunk/lib/Transforms/Utils/Local.cpp
Modified: llvm/trunk/lib/Transforms/Utils/Local.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/Local.cpp?rev=92739&r1=92738&r2=92739&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/Local.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/Local.cpp Tue Jan 5 11:50:58 2010
@@ -328,7 +328,8 @@
if (!PHIs.insert(cast<PHINode>(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;
More information about the llvm-commits
mailing list