Silence compiler warnings.
authorBenjamin Kramer <benny.kra@googlemail.com>
Sat, 16 Jul 2011 22:26:27 +0000 (22:26 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sat, 16 Jul 2011 22:26:27 +0000 (22:26 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135358 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/ScalarEvolutionExpander.cpp

index 478f555feccd8bde7b5faac61787d752579465e1..befe6d2599d6f101a7b0463b8a52812b8f7ac00c 100644 (file)
@@ -849,7 +849,7 @@ SCEVExpander::getAddRecExprPHILiterally(const SCEVAddRecExpr *Normalized,
                                         const Loop *L,
                                         const Type *ExpandTy,
                                         const Type *IntTy) {
-  assert(!IVIncInsertLoop || IVIncInsertPos && "Uninitialized insert position");
+  assert((!IVIncInsertLoop||IVIncInsertPos) && "Uninitialized insert position");
 
   // Reuse a previously-inserted PHI, if present.
   for (BasicBlock::iterator I = L->getHeader()->begin();
@@ -926,10 +926,9 @@ SCEVExpander::getAddRecExprPHILiterally(const SCEVAddRecExpr *Normalized,
                                 L->getHeader()->begin());
 
   // StartV must be hoisted into L's preheader to dominate the new phi.
-  Instruction *StartI = dyn_cast<Instruction>(StartV);
-  assert(!StartI || SE.DT->properlyDominates(StartI->getParent(),
-                                             L->getHeader()) && "");
-  (void)StartI;
+  assert(!isa<Instruction>(StartV) ||
+         SE.DT->properlyDominates(cast<Instruction>(StartV)->getParent(),
+                                  L->getHeader()));
 
   // Expand code for the step value. Insert instructions right before the
   // terminator corresponding to the back-edge. Do this before creating the PHI