1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
|
- // MIR for `repeat` before GVN
+ // MIR for `repeat` after GVN
fn repeat() -> () {
let mut _0: ();
let _1: i32;
let mut _3: i32;
let mut _4: i32;
let mut _5: i32;
let mut _6: i32;
let mut _7: i32;
let mut _8: i32;
let mut _9: i32;
let mut _10: i32;
let mut _11: i32;
let mut _12: i32;
scope 1 {
debug val => _1;
let _2: [i32; 10];
scope 2 {
debug array => _2;
}
}
bb0: {
- StorageLive(_1);
+ nop;
_1 = const 5_i32;
StorageLive(_2);
StorageLive(_3);
- _3 = copy _1;
+ _3 = const 5_i32;
StorageLive(_4);
- _4 = copy _1;
+ _4 = const 5_i32;
StorageLive(_5);
- _5 = copy _1;
+ _5 = const 5_i32;
StorageLive(_6);
- _6 = copy _1;
+ _6 = const 5_i32;
StorageLive(_7);
- _7 = copy _1;
+ _7 = const 5_i32;
StorageLive(_8);
- _8 = copy _1;
+ _8 = const 5_i32;
StorageLive(_9);
- _9 = copy _1;
+ _9 = const 5_i32;
StorageLive(_10);
- _10 = copy _1;
+ _10 = const 5_i32;
StorageLive(_11);
- _11 = copy _1;
+ _11 = const 5_i32;
StorageLive(_12);
- _12 = copy _1;
- _2 = [move _3, move _4, move _5, move _6, move _7, move _8, move _9, move _10, move _11, move _12];
+ _12 = const 5_i32;
+ _2 = [const 5_i32; 10];
StorageDead(_12);
StorageDead(_11);
StorageDead(_10);
StorageDead(_9);
StorageDead(_8);
StorageDead(_7);
StorageDead(_6);
StorageDead(_5);
StorageDead(_4);
StorageDead(_3);
_0 = const ();
StorageDead(_2);
- StorageDead(_1);
+ nop;
return;
}
}
|