Skip to content

Conversation

Azoy
Copy link
Contributor

@Azoy Azoy commented Oct 7, 2025

  • Explanation: Resolves a problem where IRGen was using zext to get the static value of a compile time integer generic. This caused issues with negative integer generics incorrectly being reported as somewhat random values instead of their desired value. Use sext instead.
  • Risk: Low. Only affects debugs builds (as far as I'm aware) and negative integer generics should be rare still.
  • Original PR: [IRGen] Correctly sext instead of zext for negative integer types #84655
  • Reviewed by: @slavapestov and @rjmccall
  • Resolves: rdar://162147174
  • Tests: Added a test exercising the exact failure described from the forum post that was failing.

[IRGen] Correctly sext instead of zext for negative integer types
@Azoy Azoy requested a review from a team as a code owner October 7, 2025 21:30
@Azoy Azoy added 🍒 release cherry pick Flag: Release branch cherry picks swift 6.2 labels Oct 7, 2025
@Azoy
Copy link
Contributor Author

Azoy commented Oct 7, 2025

@swift-ci please test

@Azoy Azoy merged commit 2a18def into swiftlang:release/6.2 Oct 8, 2025
5 checks passed
@Azoy Azoy deleted the 62-sext-instead-of-zext branch October 8, 2025 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🍒 release cherry pick Flag: Release branch cherry picks swift 6.2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants