]> granicus.if.org Git - llvm/commitdiff
[NVPTX] NVPTXLowerAggrCopies - Silence static analyzer dyn_cast<StoreInst> null deref...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 22 Sep 2019 13:14:30 +0000 (13:14 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 22 Sep 2019 13:14:30 +0000 (13:14 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372504 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/NVPTX/NVPTXLowerAggrCopies.cpp

index 0743a2986718adfd7120585aaab6c071f66caea5..83039241a7c75592e9618e9438f8d5bea9377d5f 100644 (file)
@@ -103,7 +103,7 @@ bool NVPTXLowerAggrCopies::runOnFunction(Function &F) {
   // Do the transformation of an aggr load/copy/set to a loop
   //
   for (LoadInst *LI : AggrLoads) {
-    StoreInst *SI = dyn_cast<StoreInst>(*LI->user_begin());
+    auto *SI = cast<StoreInst>(*LI->user_begin());
     Value *SrcAddr = LI->getOperand(0);
     Value *DstAddr = SI->getOperand(1);
     unsigned NumLoads = DL.getTypeStoreSize(LI->getType());