mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[ForEachLoopUnroll] Fix move_value handling.
This commit is contained in:
@@ -307,7 +307,7 @@ void ArrayInfo::classifyUsesOfArray(SILValue arrayValue) {
|
||||
forEachCalls.insert(forEachCall);
|
||||
continue;
|
||||
}
|
||||
// Recursively classify begin_borrow and copy_value uses.
|
||||
// Recursively classify begin_borrow, copy_value, and move_value uses.
|
||||
if (BeginBorrowInst *beginBorrow = dyn_cast<BeginBorrowInst>(user)) {
|
||||
classifyUsesOfArray(beginBorrow);
|
||||
continue;
|
||||
@@ -316,6 +316,10 @@ void ArrayInfo::classifyUsesOfArray(SILValue arrayValue) {
|
||||
classifyUsesOfArray(copyValue);
|
||||
continue;
|
||||
}
|
||||
if (MoveValueInst *moveValue = dyn_cast<MoveValueInst>(user)) {
|
||||
classifyUsesOfArray(moveValue);
|
||||
continue;
|
||||
}
|
||||
if (DestroyValueInst *destroyValue = dyn_cast<DestroyValueInst>(user)) {
|
||||
destroys.push_back(destroyValue);
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user