File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 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 {
16551655 discr,
16561656 variants
16571657 } ,
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+ } ,
16621662 abi,
16631663 align,
16641664 size
Original file line number Diff line number Diff line change @@ -32,13 +32,14 @@ pub enum Enum4 {
3232 A ( i32 ) ,
3333 B ( i32 ) ,
3434}
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] }
3637
3738pub enum Enum64 {
3839 A ( Align64 ) ,
3940 B ( i32 ) ,
4041}
41- // CHECK: %Enum64 = type { [16 x i64 ] }
42+ // CHECK: %Enum64 = type { [0 x i32], i32, [31 x i32 ] }
4243// CHECK: %"Enum64::A" = type { [8 x i64], %Align64, [0 x i64] }
4344
4445// CHECK-LABEL: @align64
You can’t perform that action at this time.
0 commit comments