From ba48d7b486f85a062cb167cdfbc1f090e31a3eea Mon Sep 17 00:00:00 2001 From: Davide Italiano Date: Sat, 26 Aug 2017 22:31:10 +0000 Subject: [PATCH] [NewGVN] Use `auto` when the type is obvious NFCI. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311838 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Scalar/NewGVN.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Transforms/Scalar/NewGVN.cpp b/lib/Transforms/Scalar/NewGVN.cpp index d260a15707e..40e671fc108 100644 --- a/lib/Transforms/Scalar/NewGVN.cpp +++ b/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 = -- 2.50.1