mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[codemotion] CondFail does not cause us to read/write memory in a manner that we care about.
Swift SVN r13323
This commit is contained in:
@@ -95,6 +95,10 @@ void promoteMemoryOperationsInBlock(SILBasicBlock *BB) {
|
||||
if (isReadNone(BI))
|
||||
continue;
|
||||
|
||||
// cond_fail does not read/write memory in a manner that we care about.
|
||||
if (isa<CondFailInst>(Inst))
|
||||
continue;
|
||||
|
||||
// All other instructions that read from memory invalidate the store.
|
||||
if (Inst->mayReadFromMemory())
|
||||
PrevStore = 0;
|
||||
|
||||
Reference in New Issue
Block a user