summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/Local.cpp
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-01-12 04:24:46 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-01-12 04:24:46 +0000
commitcddc9dfe975c3152a2db955b24cb6b4ee457e571 (patch)
treea06773a4c05b5949c043c0246fcb64b88f073653 /llvm/lib/Transforms/Utils/Local.cpp
parente4c7fcd1bd0e85b1dc83bed2c8a293cbd1514317 (diff)
downloadbcm5719-llvm-cddc9dfe975c3152a2db955b24cb6b4ee457e571.tar.gz
bcm5719-llvm-cddc9dfe975c3152a2db955b24cb6b4ee457e571.zip
Implement review feedback for the ConstantBool->ConstantInt merge. Chris
recommended that getBoolValue be replaced with getZExtValue and that get(bool) be replaced by get(const Type*, uint64_t). This implements those changes. llvm-svn: 33110
Diffstat (limited to 'llvm/lib/Transforms/Utils/Local.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/Local.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp
index f3d6ca85ccf..fd24f10de8b 100644
--- a/llvm/lib/Transforms/Utils/Local.cpp
+++ b/llvm/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()
OpenPOWER on IntegriCloud