mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
[msan] Fix handling of phi in blacklisted functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212454 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -716,8 +716,6 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
|
||||
|
||||
// Finalize PHI nodes.
|
||||
for (PHINode *PN : ShadowPHINodes) {
|
||||
Value *S = getShadow(PN);
|
||||
if (isa<Constant>(S)) continue;
|
||||
PHINode *PNS = cast<PHINode>(getShadow(PN));
|
||||
PHINode *PNO = MS.TrackOrigins ? cast<PHINode>(getOrigin(PN)) : nullptr;
|
||||
size_t NumValues = PN->getNumIncomingValues();
|
||||
@@ -2396,6 +2394,11 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
|
||||
|
||||
void visitPHINode(PHINode &I) {
|
||||
IRBuilder<> IRB(&I);
|
||||
if (!PropagateShadow) {
|
||||
setShadow(&I, getCleanShadow(&I));
|
||||
return;
|
||||
}
|
||||
|
||||
ShadowPHINodes.push_back(&I);
|
||||
setShadow(&I, IRB.CreatePHI(getShadowTy(&I), I.getNumIncomingValues(),
|
||||
"_msphi_s"));
|
||||
|
||||
Reference in New Issue
Block a user