swift
acfe74b5 - LoopInvariantCodeMotion: fix an ownership error caused by hoisting trivial sub-projection loads

Commit
9 days ago
LoopInvariantCodeMotion: fix an ownership error caused by hoisting trivial sub-projection loads If `load [trivial]` only loads a "part" of a stored value, which itself is non-trivial, the pass crashes with an ownership error. The fix is to wrap the projection instructions (e.g. `struct_extract`) inside a borrow scope. This is correctly done in `createProjectionAndCopy`. https://github.com/swiftlang/swift/issues/89255 rdar://177430359
Author
Committer
Parents
Loading