diff options
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; } |