Use isa<> instead of dyn_cast<> (NFC).

llvm-svn: 298268
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp
index 4699632..3b1e501 100644
--- a/llvm/lib/Transforms/Utils/Local.cpp
+++ b/llvm/lib/Transforms/Utils/Local.cpp
@@ -1361,8 +1361,8 @@
     return MetadataAsValue::get(I.getContext(), ValueAsMetadata::get(V));
   };
 
-  if (auto *BitCast = dyn_cast<BitCastInst>(&I)) {
-    findDbgValues(DbgValues, BitCast);
+  if (isa<BitCastInst>(&I)) {
+    findDbgValues(DbgValues, &I);
     for (auto *DVI : DbgValues) {
       // Bitcasts are entirely irrelevant for debug info. Rewrite the dbg.value
       // to use the cast's source.
@@ -1370,7 +1370,7 @@
       DEBUG(dbgs() << "SALVAGE: " << *DVI << '\n');
     }
   } else if (auto *GEP = dyn_cast<GetElementPtrInst>(&I)) {
-    findDbgValues(DbgValues, GEP);
+    findDbgValues(DbgValues, &I);
     for (auto *DVI : DbgValues) {
       unsigned BitWidth =
           M.getDataLayout().getPointerSizeInBits(GEP->getPointerAddressSpace());
@@ -1386,8 +1386,8 @@
         DEBUG(dbgs() << "SALVAGE: " << *DVI << '\n');
       }
     }
-  } else if (auto *Load = dyn_cast<LoadInst>(&I)) {
-    findDbgValues(DbgValues, Load);
+  } else if (isa<LoadInst>(&I)) {
+    findDbgValues(DbgValues, &I);
     for (auto *DVI : DbgValues) {
       // Rewrite the load into DW_OP_deref.
       auto *DIExpr = DVI->getExpression();