aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/LoopVersioning.cpp
diff options
context:
space:
mode:
authorAdam Nemet <anemet@apple.com>2016-06-14 09:39:01 +0000
committerAdam Nemet <anemet@apple.com>2016-06-14 09:39:01 +0000
commit57fb8989a55ecb978e14908c3c1b25b93624494e (patch)
treeb585ebf8310393ea0e8efa6f86d993a6914a8937 /llvm/lib/Transforms/Utils/LoopVersioning.cpp
parent73a26957fc972fe7bc335cfa7d96e76d2009b9ae (diff)
downloadllvm-57fb8989a55ecb978e14908c3c1b25b93624494e.zip
llvm-57fb8989a55ecb978e14908c3c1b25b93624494e.tar.gz
llvm-57fb8989a55ecb978e14908c3c1b25b93624494e.tar.bz2
[LoopVer] Remove an assert that's redundant now. NFC
Ensuring that the PHI are all single-operand is not performed in the second pass added by the previous pass. This removes the assert from the first pass. llvm-svn: 272650
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopVersioning.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/LoopVersioning.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopVersioning.cpp b/llvm/lib/Transforms/Utils/LoopVersioning.cpp
index 83af2d8..65d781b 100644
--- a/llvm/lib/Transforms/Utils/LoopVersioning.cpp
+++ b/llvm/lib/Transforms/Utils/LoopVersioning.cpp
@@ -133,11 +133,8 @@ void LoopVersioning::addPHINodes(
// See if we have a single-operand PHI with the value defined by the
// original loop.
for (auto I = PHIBlock->begin(); (PN = dyn_cast<PHINode>(I)); ++I) {
- if (PN->getIncomingValue(0) == Inst) {
- assert(PN->getNumOperands() == 1 &&
- "Exit block should only have on predecessor");
+ if (PN->getIncomingValue(0) == Inst)
break;
- }
}
// If not create it.
if (!PN) {