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 | 031340a551582b0044849541a08cdfb76574f70a (patch) | |
tree | e2f5fdeca14842b2edf03a35fe3ce7484544f090 /llvm/lib/Transforms/Utils/SimplifyCFG.cpp | |
parent | 05ed0396ec42b5cfeb6a3aa40f8bf2599f1e72c0 (diff) | |
download | bcm5719-llvm-031340a551582b0044849541a08cdfb76574f70a.tar.gz bcm5719-llvm-031340a551582b0044849541a08cdfb76574f70a.zip |
Fix bug: SimplifyCFG/2003-08-17-BranchFoldOrdering.ll
llvm-svn: 7921
Diffstat (limited to 'llvm/lib/Transforms/Utils/SimplifyCFG.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/SimplifyCFG.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp index 1adbef9253a..ed0d45be26b 100644 --- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/llvm/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; } |