Skip to content

Conversation

@kateinoigakukun
Copy link
Member

The shouldExpand in OptUtils.swift was incorrectly returning true unconditionally when useAggressiveReg2MemForCodeSize was disabled. The expansion might be invalid for types with addr-only types and structs with deinit, but we didn't check them before. This could lead to invalid destructure_struct instructions without drop_deinit being emitted.

Close #85521

@kateinoigakukun
Copy link
Member Author

@swift-ci smoke test

…aggressive reg2mem

The `shouldExpand` in `OptUtils.swift` was incorrectly returning `true`
unconditionally when `useAggressiveReg2MemForCodeSize` was disabled. The
expansion might be invalid for types with addr-only types and structs
with deinit, but we didn't check them before. This could lead to invalid
`destructure_struct` instructions without `drop_deinit` being emitted.
@kateinoigakukun kateinoigakukun force-pushed the yt/fix-non-reg2mem-rle-crash branch from 722b92c to fba5c9d Compare November 15, 2025 19:30
@kateinoigakukun
Copy link
Member Author

@swift-ci Please smoke test

@kateinoigakukun
Copy link
Member Author

@swift-ci Please smoke test macOS platform

@kateinoigakukun
Copy link
Member Author

swiftlang/swift-docc#1351
@swift-ci smoke test Windows platform

@kateinoigakukun
Copy link
Member Author

swiftlang/swift-docc#1352
@swift-ci smoke test Windows platform

@kateinoigakukun kateinoigakukun marked this pull request as ready for review November 16, 2025 14:09
@kateinoigakukun
Copy link
Member Author

Merging to unblock CI

@kateinoigakukun kateinoigakukun merged commit 8748213 into swiftlang:main Nov 16, 2025
3 checks passed
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.

SIL verification failed: a destructure of a move-only-type-with-deinit requires a drop_deinit

1 participant