[llvm] 6ff1ea3 - Fix "use of uninitialized variable" static analyzer warning. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 7 04:07:05 PST 2020
Author: Simon Pilgrim
Date: 2020-01-07T12:06:54Z
New Revision: 6ff1ea3244c543ad24fc99c7f4979db2f2078593
URL: https://github.com/llvm/llvm-project/commit/6ff1ea3244c543ad24fc99c7f4979db2f2078593
DIFF: https://github.com/llvm/llvm-project/commit/6ff1ea3244c543ad24fc99c7f4979db2f2078593.diff
LOG: Fix "use of uninitialized variable" static analyzer warning. NFCI.
Added:
Modified:
llvm/lib/Target/AMDGPU/R600InstrInfo.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/R600InstrInfo.cpp b/llvm/lib/Target/AMDGPU/R600InstrInfo.cpp
index 11dd249f8ada..346296c77377 100644
--- a/llvm/lib/Target/AMDGPU/R600InstrInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/R600InstrInfo.cpp
@@ -541,7 +541,7 @@ R600InstrInfo::fitsReadPortLimitations(const std::vector<MachineInstr *> &IG,
std::vector<std::vector<std::pair<int, unsigned>>> IGSrcs;
ValidSwizzle.clear();
- unsigned ConstCount;
+ unsigned ConstCount = 0;
BankSwizzle TransBS = ALU_VEC_012_SCL_210;
for (unsigned i = 0, e = IG.size(); i < e; ++i) {
IGSrcs.push_back(ExtractSrcs(*IG[i], PV, ConstCount));
More information about the llvm-commits
mailing list