diff options
Diffstat (limited to 'lib/Transforms/Utils/Local.cpp')
-rw-r--r-- | lib/Transforms/Utils/Local.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Utils/Local.cpp b/lib/Transforms/Utils/Local.cpp index f3d6ca8..fd24f10 100644 --- a/lib/Transforms/Utils/Local.cpp +++ b/lib/Transforms/Utils/Local.cpp @@ -176,8 +176,8 @@ bool llvm::ConstantFoldTerminator(BasicBlock *BB) { if (ConstantInt *Cond = dyn_cast<ConstantInt>(BI->getCondition())) { // Are we branching on constant? // YES. Change to unconditional branch... - BasicBlock *Destination = Cond->getBoolValue() ? Dest1 : Dest2; - BasicBlock *OldDest = Cond->getBoolValue() ? Dest2 : Dest1; + BasicBlock *Destination = Cond->getZExtValue() ? Dest1 : Dest2; + BasicBlock *OldDest = Cond->getZExtValue() ? Dest2 : Dest1; //cerr << "Function: " << T->getParent()->getParent() // << "\nRemoving branch from " << T->getParent() |