AMDGPUPrintfRuntimeBinding - silence static analyzer null dereference warnings. NFCI.

llvm-svn: 372501
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp b/llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp
index 90ea246..261d628 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp
@@ -163,8 +163,7 @@
   const char NonLiteralStr[4] = "???";
 
   for (auto P : Printfs) {
-    CallInst *CI = dyn_cast<CallInst>(P);
-
+    auto CI = cast<CallInst>(P);
     unsigned NumOps = CI->getNumArgOperands();
 
     SmallString<16> OpConvSpecifiers;
@@ -566,7 +565,7 @@
 
   // erase the printf calls
   for (auto P : Printfs) {
-    CallInst *CI = dyn_cast<CallInst>(P);
+    auto CI = cast<CallInst>(P);
     CI->eraseFromParent();
   }