mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
tryJoinIfDestroyConsumingUseInSameBlock replaces a copy with its operand when there is no use of the copy's operand between the copy's forwarded consuming use and the copy operand's destroy in the same block. It is illegal to do this transformation when there is a non-consuming use of the copy operand after the forwarded consuming use of the copy. The code checking this illegal case was not considerin the case where the consuming use of the copy was in the same instruction as the non-consuming use of the copy operand. rdar://154712867