Unbreak the build
authorChris Lattner <sabre@nondot.org>
Thu, 15 Apr 2004 14:17:43 +0000 (14:17 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 15 Apr 2004 14:17:43 +0000 (14:17 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12956 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/ScalarEvolution.cpp

index f96cd5d82b81ea817c93d9a75a74c33f6bc5ed02..8a2a8dceefb3a2dce77f31f4882478b3fcdf297e 100644 (file)
@@ -2490,6 +2490,7 @@ Value *ScalarEvolutionRewriter::ExpandCodeFor(SCEVHandle SH,
       if ((*UI)->getType() == Ty)
         if (CastInst *CI = dyn_cast<CastInst>(cast<Instruction>(*UI))) {
           BasicBlock::iterator It = I; ++It;
+          while (isa<PHINode>(It)) ++It;
           if (It != BasicBlock::iterator(CI)) {
             // Splice the cast immediately after the operand in question.
             I->getParent()->getInstList().splice(It,