From 9bdccb37d5aafc18cf9da1267f4f59d271a4f3b2 Mon Sep 17 00:00:00 2001 From: Davide Italiano Date: Sat, 26 Aug 2017 22:31:10 +0000 Subject: [NewGVN] Use `auto` when the type is obvious NFCI. llvm-svn: 311838 --- llvm/lib/Transforms/Scalar/NewGVN.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/Transforms') diff --git a/llvm/lib/Transforms/Scalar/NewGVN.cpp b/llvm/lib/Transforms/Scalar/NewGVN.cpp index d260a15707e..40e671fc108 100644 --- a/llvm/lib/Transforms/Scalar/NewGVN.cpp +++ b/llvm/lib/Transforms/Scalar/NewGVN.cpp @@ -1302,7 +1302,7 @@ NewGVN::performSymbolicLoadCoercion(Type *LoadType, Value *LoadPtr, } } - } else if (LoadInst *DepLI = dyn_cast(DepInst)) { + } else if (auto *DepLI = dyn_cast(DepInst)) { // Can't forward from non-atomic to atomic without violating memory model. if (LI->isAtomic() > DepLI->isAtomic()) return nullptr; @@ -1318,7 +1318,7 @@ NewGVN::performSymbolicLoadCoercion(Type *LoadType, Value *LoadPtr, } } - } else if (MemIntrinsic *DepMI = dyn_cast(DepInst)) { + } else if (auto *DepMI = dyn_cast(DepInst)) { int Offset = analyzeLoadFromClobberingMemInst(LoadType, LoadPtr, DepMI, DL); if (Offset >= 0) { if (auto *PossibleConstant = -- cgit v1.2.3