aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Utils/Local.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-08-17 19:34:55 +0000
committerChris Lattner <sabre@nondot.org>2003-08-17 19:34:55 +0000
commit342a9d1464ed3483b45b0ca47c0b130ba080c938 (patch)
tree906f524523710aef16a53bdd9843cdf407f1c0b1 /lib/Transforms/Utils/Local.cpp
parent128cf79bcc57124ff646b4c7b701cef44306fab8 (diff)
The fixme is irrelevant: if that happens, the LLVM bytecode is malformed.
This fixes testcase: SimplifyCFG/2003-08-17-BranchFold.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7919 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/Local.cpp')
-rw-r--r--lib/Transforms/Utils/Local.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/Transforms/Utils/Local.cpp b/lib/Transforms/Utils/Local.cpp
index 0d15ab5055..d3778c5044 100644
--- a/lib/Transforms/Utils/Local.cpp
+++ b/lib/Transforms/Utils/Local.cpp
@@ -61,12 +61,7 @@ bool ConstantFoldTerminator(BasicBlock *BB) {
// unconditional branch.
BI->setUnconditionalDest(Destination);
return true;
- }
-#if 0
- // FIXME: TODO: This doesn't work if the destination has PHI nodes with
- // different incoming values on each branch!
- //
- else if (Dest2 == Dest1) { // Conditional branch to same location?
+ } else if (Dest2 == Dest1) { // Conditional branch to same location?
// This branch matches something like this:
// br bool %cond, label %Dest, label %Dest
// and changes it into: br label %Dest
@@ -79,7 +74,6 @@ bool ConstantFoldTerminator(BasicBlock *BB) {
BI->setUnconditionalDest(Dest1);
return true;
}
-#endif
}
return false;
}