1 // compile-flags: -C no-prepopulate-passes
4 // min-system-llvm-version: 12.0
11 // ignore-riscv64 see codegen/riscv-abi
17 // See repr-transparent.rs
19 #![feature(transparent_unions)]
24 #[derive(Clone, Copy)]
26 pub struct BigS([u32; 16]);
29 pub struct TsBigS(BigS);
41 // CHECK: define void @test_BigS(%BigS* [[BIGS_RET_ATTRS1:.*]] sret(%BigS) [[BIGS_RET_ATTRS2:.*]], [16 x i32]
43 pub extern fn test_BigS(_: BigS) -> BigS { loop {} }
45 // CHECK: define void @test_TsBigS(%TsBigS* [[BIGS_RET_ATTRS1]] sret(%TsBigS) [[BIGS_RET_ATTRS2]], [16 x i32]
47 pub extern fn test_TsBigS(_: TsBigS) -> TsBigS { loop {} }
49 // CHECK: define void @test_TuBigS(%TuBigS* [[BIGS_RET_ATTRS1]] sret(%TuBigS) [[BIGS_RET_ATTRS2]], [16 x i32]
51 pub extern fn test_TuBigS(_: TuBigS) -> TuBigS { loop {} }
53 // CHECK: define void @test_TeBigS(%"TeBigS::Variant"* [[BIGS_RET_ATTRS1]] sret(%"TeBigS::Variant") [[BIGS_RET_ATTRS2]], [16 x i32]
55 pub extern fn test_TeBigS(_: TeBigS) -> TeBigS { loop {} }
58 #[derive(Clone, Copy)]
65 pub struct TsBigU(BigU);
77 // CHECK: define void @test_BigU(%BigU* [[BIGU_RET_ATTRS1:.*]] sret(%BigU) [[BIGU_RET_ATTRS2:.*]], [16 x i32]
79 pub extern fn test_BigU(_: BigU) -> BigU { loop {} }
81 // CHECK: define void @test_TsBigU(%TsBigU* [[BIGU_RET_ATTRS1]] sret(%TsBigU) [[BIGU_RET_ATTRS2]], [16 x i32]
83 pub extern fn test_TsBigU(_: TsBigU) -> TsBigU { loop {} }
85 // CHECK: define void @test_TuBigU(%TuBigU* [[BIGU_RET_ATTRS1]] sret(%TuBigU) [[BIGU_RET_ATTRS2]], [16 x i32]
87 pub extern fn test_TuBigU(_: TuBigU) -> TuBigU { loop {} }
89 // CHECK: define void @test_TeBigU(%"TeBigU::Variant"* [[BIGU_RET_ATTRS1]] sret(%"TeBigU::Variant") [[BIGU_RET_ATTRS2]], [16 x i32]
91 pub extern fn test_TeBigU(_: TeBigU) -> TeBigU { loop {} }