Create constant expression casts instead of constant instructions if possible
[oota-llvm.git] / lib / CodeGen / MachineFunction.cpp
index 7ee2dcf457877054f05ec62ba025f2fa2dc16f6d..57b34fae1f528b74dbf5db800611c3fa6171095c 100644 (file)
@@ -247,7 +247,7 @@ ComputeMaxOptionalArgsSize(const TargetMachine& target, const Function *F,
   
   for (Function::const_iterator BB = F->begin(), BBE = F->end(); BB !=BBE; ++BB)
     for (BasicBlock::const_iterator I = BB->begin(), E = BB->end(); I != E; ++I)
-      if (const CallInst *callInst = dyn_cast<CallInst>(&*I))
+      if (const CallInst *callInst = dyn_cast<CallInst>(I))
         {
           unsigned numOperands = callInst->getNumOperands() - 1;
           int numExtra = (int)numOperands-frameInfo.getNumFixedOutgoingArgs();