[llvm-commits] [llvm] r135358 - /llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp

Benjamin Kramer benny.kra at googlemail.com
Sat Jul 16 15:26:27 PDT 2011


Author: d0k
Date: Sat Jul 16 17:26:27 2011
New Revision: 135358

URL: http://llvm.org/viewvc/llvm-project?rev=135358&view=rev
Log:
Silence compiler warnings.

Modified:
    llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp

Modified: llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp?rev=135358&r1=135357&r2=135358&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp (original)
+++ llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp Sat Jul 16 17:26:27 2011
@@ -849,7 +849,7 @@
                                         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 @@
                                 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





More information about the llvm-commits mailing list