<commit_before>//! Check that types of up to 128 bits are passed and returned by-value instead of via pointer.

// compile-flags: -C no-prepopulate-passes -O
// only-x86_64

#![crate_type = "lib"]

pub struct S {
    a: u64,
    b: u32,
    c: u32,
}

// CHECK: define i128 @modify(i128 %0)
#[no_mangle]
pub fn modify(s: S) -> S {
    S { a: s.a + s.a, b: s.b + s.b, c: s.c + s.c }
}

#[repr(packed)]
pub struct TooBig {
    a: u64,
    b: u32,
    c: u32,
    d: u8,
}

// CHECK: define void @m_big(%TooBig* [[ATTRS:.*sret.*]], %TooBig* [[ATTRS2:.*]] %s)
#[no_mangle]
pub fn m_big(s: TooBig) -> TooBig {
    TooBig { a: s.a + s.a, b: s.b + s.b, c: s.c + s.c, d: s.d + s.d }
}
<commit_msg>make test work in llvm 9<commit_after>//! Check that types of up to 128 bits are passed and returned by-value instead of via pointer.

// compile-flags: -C no-prepopulate-passes -O
// only-x86_64

#![crate_type = "lib"]

pub struct S {
    a: u64,
    b: u32,
    c: u32,
}

// CHECK: define i128 @modify(i128{{( %0)?}})
#[no_mangle]
pub fn modify(s: S) -> S {
    S { a: s.a + s.a, b: s.b + s.b, c: s.c + s.c }
}

#[repr(packed)]
pub struct TooBig {
    a: u64,
    b: u32,
    c: u32,
    d: u8,
}

// CHECK: define void @m_big(%TooBig* [[ATTRS:.*sret.*]], %TooBig* [[ATTRS2:.*]] %s)
#[no_mangle]
pub fn m_big(s: TooBig) -> TooBig {
    TooBig { a: s.a + s.a, b: s.b + s.b, c: s.c + s.c, d: s.d + s.d }
}

{'fraction_non_alphanumeric': 0.20702005730659026, 'fraction_numerical': 0.04083094555873926, 'mean_word_length': 2.457920792079208, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6709540', 'n_tokens_mistral': 684, 'n_tokens_neox': 659, 'n_words': 193}