Skip to content

Conversation

@eeckstein
Copy link
Contributor

@eeckstein eeckstein commented Dec 22, 2025

The verifier reported a false error in case an unowned (trivial) value was used in an guaranteed phi argument outside the liverange of a borrow scope. For example:

  %2 = begin_borrow %0
  %3 = struct_extract %2 , #KlassAndInt.int    // %3 is trivial and can outlive the borrow scope
  end_borrow %2
  %6 = struct $KlassAndInt (%someOtherGuaranteedValue, %3)
  br bb2(%6)

bb2(%8 : @guaranteed $KlassAndInt):      // false error reported at the uses of %8

Fixes a compiler crash
rdar://167003182

The verifier reported a false error in case an unowned (trivial) value was used in an guaranteed phi argument outside the liverange of a borrow scope.
For example:

```
  %2 = begin_borrow %0
  %3 = struct_extract %2 , #KlassAndInt.int                // %3 is trivial and can outlive the borrow scope
  end_borrow %2
  %6 = struct $KlassAndInt (%someOtherGuaranteedValue, %3)
  br bb2(%6)

bb2(%8 : @guaranteed $KlassAndInt):      // false error reported at the uses of %8
```
@eeckstein eeckstein requested a review from jckarter as a code owner December 22, 2025 06:57
@eeckstein eeckstein requested review from meg-gupta and removed request for jckarter December 22, 2025 06:57
@eeckstein
Copy link
Contributor Author

@swift-ci smoke test

@eeckstein
Copy link
Contributor Author

@swift-ci smoke test windows

@eeckstein
Copy link
Contributor Author

@swift-ci smoke test windows

@eeckstein eeckstein enabled auto-merge December 22, 2025 21:56
@eeckstein
Copy link
Contributor Author

@swift-ci smoke test windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants