1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 12:41:49 +01:00

[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
This commit is contained in:
Roman Lebedev 2019-09-18 21:04:39 +00:00
parent 747664eb81
commit 944fb03b2b

View File

@ -3022,7 +3022,7 @@ static bool mergeConditionalStoreToAddress(BasicBlock *PTB, BasicBlock *PFB,
return true; return true;
}; };
ArrayRef<StoreInst *> FreeStores = {PStore, QStore}; const SmallVector<StoreInst *, 2> FreeStores = {PStore, QStore};
if (!MergeCondStoresAggressively && if (!MergeCondStoresAggressively &&
(!IsWorthwhile(PTB, FreeStores) || !IsWorthwhile(PFB, FreeStores) || (!IsWorthwhile(PTB, FreeStores) || !IsWorthwhile(PFB, FreeStores) ||
!IsWorthwhile(QTB, FreeStores) || !IsWorthwhile(QFB, FreeStores))) !IsWorthwhile(QTB, FreeStores) || !IsWorthwhile(QFB, FreeStores)))