diff options
author | Devang Patel <dpatel@apple.com> | 2009-02-05 19:15:39 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2009-02-05 19:15:39 +0000 |
commit | 1851db6b0f9ef1b85d14b24eb9f838748396352f (patch) | |
tree | f9287af32d7fde31f0a807283281d6c1cae35244 /lib/Transforms/Scalar/CondPropagate.cpp | |
parent | ca940bb630b20c6a8bd7eb895563ca97817c23e6 (diff) |
Ignore dbg intrinsics while propagating conditional expression info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63876 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/CondPropagate.cpp')
-rw-r--r-- | lib/Transforms/Scalar/CondPropagate.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/CondPropagate.cpp b/lib/Transforms/Scalar/CondPropagate.cpp index f68fb292e4..1b755171c3 100644 --- a/lib/Transforms/Scalar/CondPropagate.cpp +++ b/lib/Transforms/Scalar/CondPropagate.cpp @@ -137,7 +137,7 @@ void CondProp::SimplifyPredecessors(BranchInst *BI) { if (!PN->hasOneUse()) return; BasicBlock *BB = BI->getParent(); - if (&*BB->begin() != PN || &*next(BB->begin()) != BI) + if (!isTerminatorFirstRelevantInsn (BB, BI)) return; // Ok, we have this really simple case, walk the PHI operands, looking for @@ -171,7 +171,7 @@ void CondProp::SimplifyPredecessors(SwitchInst *SI) { if (!PN->hasOneUse()) return; BasicBlock *BB = SI->getParent(); - if (&*BB->begin() != PN || &*next(BB->begin()) != SI) + if (!isTerminatorFirstRelevantInsn (BB, SI)) return; bool RemovedPreds = false; |