Skip to content

Commit

Permalink
bless else
Browse files Browse the repository at this point in the history
  • Loading branch information
tesuji committed Jun 13, 2024
1 parent c2acc80 commit e216c11
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
bb0: {
StorageLive(_1);
StorageLive(_2);
_2 = [const 0_u32, const 1_u32, const 2_u32, const 3_u32];
- _2 = [const 0_u32, const 1_u32, const 2_u32, const 3_u32];
+ _2 = const [0_u32, 1_u32, 2_u32, 3_u32];
StorageLive(_3);
_3 = const 2_usize;
- _4 = Len(_2);
Expand All @@ -35,5 +36,9 @@
StorageDead(_1);
return;
}
+ }
+
+ ALLOC0 (size: 16, align: 4) {
+ 00 00 00 00 01 00 00 00 02 00 00 00 03 00 00 00 │ ................
}

6 changes: 2 additions & 4 deletions tests/mir-opt/const_prop/read_immutable_static.main.GVN.diff
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@

bb0: {
StorageLive(_1);
- StorageLive(_2);
StorageLive(_2);
- StorageLive(_3);
+ nop;
+ nop;
_3 = const {ALLOC0: &u8};
- _2 = (*_3);
Expand All @@ -29,8 +28,7 @@
+ _4 = const 2_u8;
+ _1 = const 4_u8;
StorageDead(_4);
- StorageDead(_2);
+ nop;
StorageDead(_2);
StorageDead(_5);
- StorageDead(_3);
+ nop;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
+ _1 = const 4_i32;
StorageLive(_3);
StorageLive(_4);
_4 = [const 0_i32, const 1_i32, const 2_i32, const 3_i32, const 4_i32, const 5_i32];
- _4 = [const 0_i32, const 1_i32, const 2_i32, const 3_i32, const 4_i32, const 5_i32];
+ _4 = const [0_i32, 1_i32, 2_i32, 3_i32, 4_i32, 5_i32];
StorageLive(_5);
_5 = const 3_usize;
_6 = const 6_usize;
Expand Down Expand Up @@ -65,5 +66,10 @@
+
+ ALLOC0 (size: 8, align: 4) {
+ 04 00 00 00 00 __ __ __ │ .....░░░
+ }
+
+ ALLOC1 (size: 24, align: 4) {
+ 0x00 │ 00 00 00 00 01 00 00 00 02 00 00 00 03 00 00 00 │ ................
+ 0x10 │ 04 00 00 00 05 00 00 00 │ ........
}

0 comments on commit e216c11

Please sign in to comment.