nullptr initialize variables, spotted on msan bots.
authorEric Christopher <echristo@gmail.com>
Sat, 11 Sep 2021 01:10:16 +0000 (18:10 -0700)
committerEric Christopher <echristo@gmail.com>
Sat, 11 Sep 2021 01:10:53 +0000 (18:10 -0700)
llvm/lib/Transforms/Scalar/LoopFlatten.cpp

index 83d7899..931bcc2 100644 (file)
@@ -424,8 +424,8 @@ static bool checkIVUsers(FlattenInfo &FI) {
 
     LLVM_DEBUG(dbgs() << "Found use of inner induction variable: "; U->dump());
 
-    Value *MatchedMul;
-    Value *MatchedItCount;
+    Value *MatchedMul = nullptr;
+    Value *MatchedItCount = nullptr;
     bool IsAdd = match(U, m_c_Add(m_Specific(FI.InnerInductionPHI),
                                   m_Value(MatchedMul))) &&
                  match(MatchedMul, m_c_Mul(m_Specific(FI.OuterInductionPHI),