isa+cast -> dyncast.

llvm-svn: 47320
This commit is contained in:
Chris Lattner 2008-02-19 06:53:20 +00:00
parent 0ee0f38084
commit 99e0b1c063

View File

@ -1220,8 +1220,8 @@ bool GVN::processInstruction(Instruction* I,
if (dep == MemoryDependenceAnalysis::None ||
dep == MemoryDependenceAnalysis::NonLocal)
return false;
if (isa<MemCpyInst>(dep))
return processMemCpy(M, cast<MemCpyInst>(dep), toErase);
if (MemCpyInst *MemCpy = dyn_cast<MemCpyInst>(dep))
return processMemCpy(M, MemCpy, toErase);
if (CallInst* C = dyn_cast<CallInst>(dep))
return performReturnSlotOptzn(M, C, toErase);
return false;