You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A tuple over an @[align(N)] record or an over-aligned SIMD vector is laid out at LLVM's alignment, not TypeLayout's, and no check reports it (#1438 class) #1964
Sibling of #1438/#1958, found while fixing #1958. A tuple's LLVM body is the literal struct of its element types, so an element whose model alignment differs from its LLVM body's lands at LLVM's offset:
(i8, Al) with type Al { a: i8, @[align(32)] b: i64 } (§16.4: the record's LLVM body is packed, abi align 1, struct_declared_align holds 32): TypeLayout says 96 bytes aligned 32, LLVM emits 72 bytes aligned 8.
(i8, Vector[8, f32]) on AArch64 (§4.3d: TypeLayout caps at 16, LLVM <8 x float> is 32-aligned): TypeLayout says 48/16, LLVM emits 64/32.
[Al; 2] agrees (128/32): arrays take the element's declared alignment.
Unlike enums/Option/Result (check_enum_layout, #1438), nothing compares a tuple's emitted layout to the model, so comptime T.size(), union members, Channel[T] slots and map tuples over such a tuple are silently mis-sized — the tool stayed silent.
Build tuple bodies the way declare_struct_type builds a record with a declared-alignment field (the padded body under struct_declared_align / declared_align_of, #1445), and add a check_tuple_layout next to check_enum_layout so a model/LLVM disagreement is a loud BUG. behav_layout_model_matches_llvm.w should then pin (i8, Al32) and (i8, Vector[4, f32]) rows.
Activity
Option takes §2's model body for every payload the nullable niche doe…
Option takes §2's model body for every payload the nullable niche doe…
Option takes §2's model body for every payload the nullable niche doe…
TypeLayout owns every layout: enums per §2, Option niche per §3, fat …
A tuple or array literal compared with a typed operand takes its type…
`==` on an aggregate that holds a vector or mask is refused at Sema (#…
Tuples and multi-field enum payloads take TypeLayout's placement; one…
A tuple or array literal compared with a typed operand takes its type…
`==` on an aggregate that holds a vector or mask is refused at Sema (#…
Tuples and multi-field enum payloads at TypeLayout's alignment (#1964)…