Skip to content

Commit 767d71f

Browse files
committed
EnumSizeOpt test: show actual bytes of new allocation
1 parent c4db0e1 commit 767d71f

5 files changed

Lines changed: 18 additions & 9 deletions

tests/mir-opt/enum_opt.cand.EnumSizeOpt.32bit.diff

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@
6464
StorageDead(_1);
6565
return;
6666
}
67-
}
67+
+ }
6868
+
69-
+ ALLOC0 (size: 8, align: 4) { .. }
69+
+ ALLOC0 (size: 8, align: 4) {
70+
+ 02 00 00 00 05 20 00 00 │ ..... ..
71+
}
7072

tests/mir-opt/enum_opt.cand.EnumSizeOpt.64bit.diff

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@
6464
StorageDead(_1);
6565
return;
6666
}
67-
}
67+
+ }
6868
+
69-
+ ALLOC0 (size: 16, align: 8) { .. }
69+
+ ALLOC0 (size: 16, align: 8) {
70+
+ 02 00 00 00 00 00 00 00 05 20 00 00 00 00 00 00 │ ......... ......
71+
}
7072

tests/mir-opt/enum_opt.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
// skip-filecheck
22
//@ test-mir-pass: EnumSizeOpt
33
// EMIT_MIR_FOR_EACH_BIT_WIDTH
4-
//@ compile-flags: -Zunsound-mir-opts -Zdump-mir-exclude-alloc-bytes
4+
//@ compile-flags: -Zunsound-mir-opts
5+
//@ ignore-endian-big
56

67
// Tests that an enum with a variant with no data gets correctly transformed.
78
pub enum NoData {

tests/mir-opt/enum_opt.unin.EnumSizeOpt.32bit.diff

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@
6464
StorageDead(_1);
6565
return;
6666
}
67-
}
67+
+ }
6868
+
69-
+ ALLOC0 (size: 8, align: 4) { .. }
69+
+ ALLOC0 (size: 8, align: 4) {
70+
+ 05 20 00 00 01 00 00 00 │ . ......
71+
}
7072

tests/mir-opt/enum_opt.unin.EnumSizeOpt.64bit.diff

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@
6464
StorageDead(_1);
6565
return;
6666
}
67-
}
67+
+ }
6868
+
69-
+ ALLOC0 (size: 16, align: 8) { .. }
69+
+ ALLOC0 (size: 16, align: 8) {
70+
+ 05 20 00 00 00 00 00 00 01 00 00 00 00 00 00 00 │ . ..............
71+
}
7072

0 commit comments

Comments
 (0)