From feea722cf3dc9bcabec7350cfb3e8ac9ed19de10 Mon Sep 17 00:00:00 2001 From: Roman Lebedev Date: Wed, 18 Sep 2019 21:04:39 +0000 Subject: [PATCH] [SimplifyCFG] mergeConditionalStoreToAddress(): try to pacify MSAN MSAN bot complains that there is use-of-uninitialized-value of this FreeStores later in IsWorthwhile(). Perhaps FreeStores needs to be stored in a vector? llvm-svn: 372262 --- llvm/lib/Transforms/Utils/SimplifyCFG.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp index 5ce19b1..f1f16ee 100644 --- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp @@ -3022,7 +3022,7 @@ static bool mergeConditionalStoreToAddress(BasicBlock *PTB, BasicBlock *PFB, return true; }; - ArrayRef FreeStores = {PStore, QStore}; + const SmallVector FreeStores = {PStore, QStore}; if (!MergeCondStoresAggressively && (!IsWorthwhile(PTB, FreeStores) || !IsWorthwhile(PFB, FreeStores) || !IsWorthwhile(QTB, FreeStores) || !IsWorthwhile(QFB, FreeStores))) -- 2.7.4