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

Gabor Greif ggreif at gmail.com
Fri Jul 9 09:42:04 PDT 2010


Author: ggreif
Date: Fri Jul  9 11:42:04 2010
New Revision: 107989

URL: http://llvm.org/viewvc/llvm-project?rev=107989&view=rev
Log:
remove useless cast and fix typos in comment

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=107989&r1=107988&r2=107989&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp (original)
+++ llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp Fri Jul  9 11:42:04 2010
@@ -21,10 +21,10 @@
 #include "llvm/ADT/STLExtras.h"
 using namespace llvm;
 
-/// ReuseOrCreateCast - Arange for there to be a cast of V to Ty at IP,
+/// ReuseOrCreateCast - Arrange for there to be a cast of V to Ty at IP,
 /// reusing an existing cast if a suitable one exists, moving an existing
 /// cast if a suitable one exists but isn't in the right place, or
-/// or creating a new one.
+/// creating a new one.
 Value *SCEVExpander::ReuseOrCreateCast(Value *V, const Type *Ty,
                                        Instruction::CastOps Op,
                                        BasicBlock::iterator IP) {
@@ -33,7 +33,7 @@
        UI != E; ++UI) {
     User *U = *UI;
     if (U->getType() == Ty)
-      if (CastInst *CI = dyn_cast<CastInst>(cast<Instruction>(U)))
+      if (CastInst *CI = dyn_cast<CastInst>(U))
         if (CI->getOpcode() == Op) {
           // If the cast isn't where we want it, fix it.
           if (BasicBlock::iterator(CI) != IP) {





More information about the llvm-commits mailing list