diff options
author | Chris Lattner <sabre@nondot.org> | 2003-08-17 19:41:53 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-08-17 19:41:53 +0000 |
commit | 694e37f08a7c09ccc24642532106295cf7b3a1e3 (patch) | |
tree | adb19b90f3b2a047d68d2c1ac53dccccc31d9845 /lib/Transforms/Utils/SimplifyCFG.cpp | |
parent | f0cd835784daf390e730f1c4a9582ff0c517e57e (diff) |
Fix bug: SimplifyCFG/2003-08-17-BranchFoldOrdering.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7921 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/SimplifyCFG.cpp')
-rw-r--r-- | lib/Transforms/Utils/SimplifyCFG.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Transforms/Utils/SimplifyCFG.cpp b/lib/Transforms/Utils/SimplifyCFG.cpp index 1adbef9253..ed0d45be26 100644 --- a/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/lib/Transforms/Utils/SimplifyCFG.cpp @@ -121,6 +121,10 @@ bool SimplifyCFG(BasicBlock *BB) { return true; } + // Check to see if we can constant propagate this terminator instruction + // away... + bool Changed = ConstantFoldTerminator(BB); + // Check to see if this block has no non-phi instructions and only a single // successor. If so, replace references to this basic block with references // to the successor. @@ -251,5 +255,5 @@ bool SimplifyCFG(BasicBlock *BB) { } } - return false; + return Changed; } |