[llvm] 8aadb44 - [scan-build] fix dead store warnings emitted on LLVM AMDGPU code base

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 5 08:19:11 PDT 2020


Author: Apelete Seketeli
Date: 2020-04-05T11:19:03-04:00
New Revision: 8aadb442d1db65fc01d85059ebb86929ddbf771b

URL: https://github.com/llvm/llvm-project/commit/8aadb442d1db65fc01d85059ebb86929ddbf771b
DIFF: https://github.com/llvm/llvm-project/commit/8aadb442d1db65fc01d85059ebb86929ddbf771b.diff

LOG: [scan-build] fix dead store warnings emitted on LLVM AMDGPU code base

This fixes dead store warnings of the type "dead assignment" reported
by Clang Static Analyzer.

Added: 
    

Modified: 
    llvm/lib/Target/AMDGPU/SIISelLowering.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AMDGPU/SIISelLowering.cpp b/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
index a6846ec1ddd8..7f4a9e9ccb14 100644
--- a/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+++ b/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
@@ -4563,7 +4563,6 @@ SDValue SITargetLowering::LowerBRCOND(SDValue BRCOND,
     };
     SDValue NewBR = DAG.getNode(ISD::BR, DL, BR->getVTList(), Ops);
     DAG.ReplaceAllUsesWith(BR, NewBR.getNode());
-    BR = NewBR.getNode();
   }
 
   SDValue Chain = SDValue(Result, Result->getNumValues() - 1);


        


More information about the llvm-commits mailing list