use [N x i8] for byval/sret types

This avoids depending on LLVM's struct types to determine the size of
the byval/sret slot.
This commit is contained in:
Erik Desjardins 2024-02-25 00:43:03 -05:00
parent 3c029725f5
commit 96a72676d1
10 changed files with 80 additions and 73 deletions

View file

@ -3,7 +3,7 @@
// See #87254.
#![crate_type = "lib"]
#![feature(repr_simd)]
#![feature(repr_simd, abi_unadjusted)]
#[derive(Copy, Clone)]
#[repr(simd)]
@ -14,6 +14,6 @@ pub struct int16x4x2_t(pub int16x4_t, pub int16x4_t);
// CHECK: %int16x4x2_t = type { <4 x i16>, <4 x i16> }
#[no_mangle]
fn takes_int16x4x2_t(t: int16x4x2_t) -> int16x4x2_t {
extern "unadjusted" fn takes_int16x4x2_t(t: int16x4x2_t) -> int16x4x2_t {
t
}