Skip to content

Commit

Permalink
bless
Browse files Browse the repository at this point in the history
  • Loading branch information
tesuji committed Jun 6, 2024
1 parent 40901d1 commit 32d9976
Showing 1 changed file with 28 additions and 12 deletions.
40 changes: 28 additions & 12 deletions tests/mir-opt/const_array_locals.main.PromoteArraysOpt.diff
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,23 @@
let _8: ();
let mut _9: [u16; 32];
let mut _11: [f32; 8];
+ let mut _15: &[i32; 32];
let _12: [[i32; 3]; 3];
let mut _13: [i32; 3];
let mut _14: [i32; 3];
let mut _15: [i32; 3];
+ let mut _19: &[i32; 32];
scope 1 {
debug _arr => _1;
let _2: [[i32; 12]; 2];
+ let mut _14: &[[i32; 12]; 2];
+ let mut _18: &[[i32; 12]; 2];
scope 2 {
debug _foo => _2;
let _5: [i32; 32];
let mut _12: &[i32; 32];
let mut _16: &[i32; 32];
scope 3 {
debug _darr => _5;
let _10: F32x8;
+ let mut _13: &[u16; 32];
+ let mut _17: &[u16; 32];
scope 4 {
debug _f => _10;
}
Expand All @@ -34,8 +38,8 @@
bb0: {
- StorageLive(_1);
- _1 = [const 255_i32, const 105_i32, const 15_i32, const 39_i32, const 62_i32, const 251_i32, const 191_i32, const 178_i32, const 9_i32, const 4_i32, const 56_i32, const 221_i32, const 193_i32, const 164_i32, const 194_i32, const 197_i32, const 6_i32, const 243_i32, const 218_i32, const 171_i32, const 87_i32, const 247_i32, const 104_i32, const 159_i32, const 22_i32, const 157_i32, const 105_i32, const 31_i32, const 96_i32, const 173_i32, const 50_i32, const 1_i32];
+ _15 = const main::promoted[3];
+ _1 = (*_15);
+ _19 = const main::promoted[3];
+ _1 = (*_19);
FakeRead(ForLet(None), _1);
- StorageLive(_2);
- StorageLive(_3);
Expand All @@ -45,21 +49,21 @@
- _2 = [move _3, move _4];
- StorageDead(_4);
- StorageDead(_3);
+ _14 = const main::promoted[2];
+ _2 = (*_14);
+ _18 = const main::promoted[2];
+ _2 = (*_18);
FakeRead(ForLet(None), _2);
StorageLive(_5);
StorageLive(_6);
_12 = const main::promoted[0];
_6 = &(*_12);
_16 = const main::promoted[0];
_6 = &(*_16);
_5 = (*_6);
FakeRead(ForLet(None), _5);
StorageDead(_6);
StorageLive(_8);
- StorageLive(_9);
- _9 = [const 255_u16, const 105_u16, const 15_u16, const 39_u16, const 62_u16, const 251_u16, const 191_u16, const 178_u16, const 9_u16, const 4_u16, const 56_u16, const 221_u16, const 193_u16, const 164_u16, const 194_u16, const 197_u16, const 6_u16, const 243_u16, const 218_u16, const 171_u16, const 87_u16, const 247_u16, const 104_u16, const 159_u16, const 22_u16, const 157_u16, const 105_u16, const 31_u16, const 96_u16, const 173_u16, const 50_u16, const 1_u16];
+ _13 = const main::promoted[1];
+ _9 = (*_13);
+ _17 = const main::promoted[1];
+ _9 = (*_17);
_8 = consume(move _9) -> [return: bb1, unwind: bb2];
}

Expand All @@ -72,6 +76,18 @@
_10 = F32x8(move _11);
StorageDead(_11);
FakeRead(ForLet(None), _10);
StorageLive(_12);
StorageLive(_13);
_13 = [const 1_i32, const 0_i32, const 0_i32];
StorageLive(_14);
_14 = [const 0_i32, const 1_i32, const 0_i32];
StorageLive(_15);
_15 = [const 0_i32, const 0_i32, const 1_i32];
_12 = [move _13, move _14, move _15];
StorageDead(_15);
StorageDead(_14);
StorageDead(_13);
StorageDead(_12);
_0 = const ();
StorageDead(_10);
StorageDead(_5);
Expand Down

0 comments on commit 32d9976

Please sign in to comment.