File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change
1
+ //@ compile-flags: -O -C no-prepopulate-passes
2
+
3
+ #![ crate_type = "lib" ]
4
+
5
+ #[ repr( transparent) ]
6
+ struct Transparent32 ( u32 ) ;
7
+
8
+ // CHECK: i32 @make_transparent(i32 noundef %x)
9
+ #[ no_mangle]
10
+ pub fn make_transparent ( x : u32 ) -> Transparent32 {
11
+ // CHECK: %a = alloca i32
12
+ // CHECK: store i32 %x, ptr %a
13
+ // CHECK: %[[TEMP:.+]] = load i32, ptr %a
14
+ // CHECK: ret i32 %[[TEMP]]
15
+ let a = Transparent32 ( x) ;
16
+ a
17
+ }
18
+
19
+ // CHECK-LABEL: { i32, i32 } @make_2_tuple(i32 noundef %x)
20
+ #[ no_mangle]
21
+ pub fn make_2_tuple ( x : u32 ) -> ( u32 , u32 ) {
22
+ // CHECK: %pair = alloca { i32, i32 }
23
+ // CHECK: store i32
24
+ // CHECK: store i32
25
+ // CHECK: load i32
26
+ // CHECK: load i32
27
+ let pair = ( x, x) ;
28
+ pair
29
+ }
You can’t perform that action at this time.
0 commit comments