[llvm] r372262 - [SimplifyCFG] mergeConditionalStoreToAddress(): try to pacify MSAN

Roman Lebedev via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 18 14:04:39 PDT 2019


Author: lebedevri
Date: Wed Sep 18 14:04:39 2019
New Revision: 372262

URL: http://llvm.org/viewvc/llvm-project?rev=372262&view=rev
Log:
[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?

Modified:
    llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp

Modified: llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp?rev=372262&r1=372261&r2=372262&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp Wed Sep 18 14:04:39 2019
@@ -3022,7 +3022,7 @@ static bool mergeConditionalStoreToAddre
     return true;
   };
 
-  ArrayRef<StoreInst *> FreeStores = {PStore, QStore};
+  const SmallVector<StoreInst *, 2> FreeStores = {PStore, QStore};
   if (!MergeCondStoresAggressively &&
       (!IsWorthwhile(PTB, FreeStores) || !IsWorthwhile(PFB, FreeStores) ||
        !IsWorthwhile(QTB, FreeStores) || !IsWorthwhile(QFB, FreeStores)))




More information about the llvm-commits mailing list