File tree 2 files changed +7
-6
lines changed
2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -1655,10 +1655,10 @@ impl<'a, 'tcx> LayoutDetails {
1655
1655
discr,
1656
1656
variants
1657
1657
} ,
1658
- // FIXME(eddyb): using ` FieldPlacement::Arbitrary` here results
1659
- // in lost optimizations, specifically around allocations, see
1660
- // `test/codegen/{alloc-optimisation, vec-optimizes-away}.rs`.
1661
- fields : FieldPlacement :: Union ( 1 ) ,
1658
+ fields : FieldPlacement :: Arbitrary {
1659
+ offsets : vec ! [ Size :: from_bytes ( 0 ) ] ,
1660
+ memory_index : vec ! [ 0 ]
1661
+ } ,
1662
1662
abi,
1663
1663
align,
1664
1664
size
Original file line number Diff line number Diff line change @@ -32,13 +32,14 @@ pub enum Enum4 {
32
32
A ( i32 ) ,
33
33
B ( i32 ) ,
34
34
}
35
- // CHECK: %Enum4 = type { [2 x i32] }
35
+ // CHECK: %Enum4 = type { [0 x i32], i32, [1 x i32] }
36
+ // CHECK: %"Enum4::A" = type { [1 x i32], i32, [0 x i32] }
36
37
37
38
pub enum Enum64 {
38
39
A ( Align64 ) ,
39
40
B ( i32 ) ,
40
41
}
41
- // CHECK: %Enum64 = type { [16 x i64 ] }
42
+ // CHECK: %Enum64 = type { [0 x i32], i32, [31 x i32 ] }
42
43
// CHECK: %"Enum64::A" = type { [8 x i64], %Align64, [0 x i64] }
43
44
44
45
// CHECK-LABEL: @align64
You can’t perform that action at this time.
0 commit comments