aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Scalar/CondPropagate.cpp
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-03-01 21:54:37 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-03-01 21:54:37 +0000
commita3507ebd33e957ff026dcbcc6675300ddab98255 (patch)
treede8fc03d28cdbf72f2f40cdd80cbf977d23021fb /lib/Transforms/Scalar/CondPropagate.cpp
parent4da0451821732e20d132e612ba8852a1c6498fab (diff)
Although probably not necessary, guard against a potential assertion by
using isNullValue() instead of getZExtValue() == 0. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34815 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/CondPropagate.cpp')
-rw-r--r--lib/Transforms/Scalar/CondPropagate.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/CondPropagate.cpp b/lib/Transforms/Scalar/CondPropagate.cpp
index 4c3a975496..fdcb404e11 100644
--- a/lib/Transforms/Scalar/CondPropagate.cpp
+++ b/lib/Transforms/Scalar/CondPropagate.cpp
@@ -139,7 +139,7 @@ void CondProp::SimplifyPredecessors(BranchInst *BI) {
// ultimate destination.
bool PHIGone = PN->getNumIncomingValues() == 2;
RevectorBlockTo(PN->getIncomingBlock(i-1),
- BI->getSuccessor(CB->getZExtValue() == 0));
+ BI->getSuccessor(CB->isNullValue()));
++NumBrThread;
// If there were two predecessors before this simplification, the PHI node