mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
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.