mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Recommit r13291 with proper tests, etc.
Swift SVN r13304
This commit is contained in:
@@ -90,6 +90,11 @@ void promoteMemoryOperationsInBlock(SILBasicBlock *BB) {
|
||||
if (isa<StrongRetainInst>(Inst))
|
||||
continue;
|
||||
|
||||
if (auto *AI = dyn_cast<ApplyInst>(Inst))
|
||||
if (auto *BI = dyn_cast<BuiltinFunctionRefInst>(&*AI->getCallee()))
|
||||
if (isReadNone(BI))
|
||||
continue;
|
||||
|
||||
// All other instructions that read from memory invalidate the store.
|
||||
if (Inst->mayReadFromMemory())
|
||||
PrevStore = 0;
|
||||
|
||||
Reference in New Issue
Block a user