Revert rev. 63876. It is causing llvm-gcc bootstrap failure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63888 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Transforms/Scalar/CondPropagate.cpp b/lib/Transforms/Scalar/CondPropagate.cpp
index 000ef60..c4e2b1a 100644
--- a/lib/Transforms/Scalar/CondPropagate.cpp
+++ b/lib/Transforms/Scalar/CondPropagate.cpp
@@ -148,7 +148,7 @@
if (!PN->hasOneUse()) return;
BasicBlock *BB = BI->getParent();
- if (!isTerminatorFirstRelevantInsn (BB, BI))
+ if (&*BB->begin() != PN || &*next(BB->begin()) != BI)
return;
// Ok, we have this really simple case, walk the PHI operands, looking for
@@ -182,7 +182,7 @@
if (!PN->hasOneUse()) return;
BasicBlock *BB = SI->getParent();
- if (!isTerminatorFirstRelevantInsn (BB, SI))
+ if (&*BB->begin() != PN || &*next(BB->begin()) != SI)
return;
bool RemovedPreds = false;