From 99e0b1c063c81880c200f7b148c0bf4d234e6b0a Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 19 Feb 2008 06:53:20 +0000 Subject: [PATCH] isa+cast -> dyncast. llvm-svn: 47320 --- lib/Transforms/Scalar/GVN.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Transforms/Scalar/GVN.cpp b/lib/Transforms/Scalar/GVN.cpp index 62039f9048f..738c4ea1d15 100644 --- a/lib/Transforms/Scalar/GVN.cpp +++ b/lib/Transforms/Scalar/GVN.cpp @@ -1220,8 +1220,8 @@ bool GVN::processInstruction(Instruction* I, if (dep == MemoryDependenceAnalysis::None || dep == MemoryDependenceAnalysis::NonLocal) return false; - if (isa(dep)) - return processMemCpy(M, cast(dep), toErase); + if (MemCpyInst *MemCpy = dyn_cast(dep)) + return processMemCpy(M, MemCpy, toErase); if (CallInst* C = dyn_cast(dep)) return performReturnSlotOptzn(M, C, toErase); return false;