compiler: split vector_align into cabi and llvmlike
Introduce a pair of functions that actually describe what they do, because it wasn't clear the alignment is sometimes a forgery.
This commit is contained in:
parent
5c474fd99b
commit
79f41c773a
3 changed files with 20 additions and 12 deletions
|
@ -535,11 +535,14 @@ fn layout_of_uncached<'tcx>(
|
|||
BackendRepr::Memory { sized: true },
|
||||
AbiAndPrefAlign {
|
||||
abi: Align::max_aligned_factor(size),
|
||||
pref: dl.vector_align(size).pref,
|
||||
pref: dl.llvmlike_vector_align(size).pref,
|
||||
},
|
||||
)
|
||||
} else {
|
||||
(BackendRepr::Vector { element: e_abi, count: e_len }, dl.vector_align(size))
|
||||
(
|
||||
BackendRepr::Vector { element: e_abi, count: e_len },
|
||||
dl.llvmlike_vector_align(size),
|
||||
)
|
||||
};
|
||||
let size = size.align_to(align.abi);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue