rust/tests/mir-opt/gvn.cast.GVN.panic-unwind.diff

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

565 lines
16 KiB
Diff
Raw Normal View History

2023-03-20 13:05:07 -05:00
- // MIR for `cast` before GVN
+ // MIR for `cast` after GVN
fn cast() -> () {
let mut _0: ();
let _1: i64;
let _4: ();
let mut _5: u8;
let mut _6: i64;
let _7: ();
let mut _8: u16;
let mut _9: i64;
let _10: ();
let mut _11: u32;
let mut _12: i64;
let _13: ();
let mut _14: u64;
let mut _15: i64;
let _16: ();
let mut _17: i8;
let mut _18: i64;
let _19: ();
let mut _20: i16;
let mut _21: i64;
let _22: ();
let mut _23: i32;
let mut _24: i64;
let _25: ();
let mut _26: i64;
let _27: ();
let mut _28: f32;
let mut _29: i64;
let _30: ();
let mut _31: f64;
let mut _32: i64;
let _33: ();
let mut _34: u8;
let mut _35: u64;
let _36: ();
let mut _37: u16;
let mut _38: u64;
let _39: ();
let mut _40: u32;
let mut _41: u64;
let _42: ();
let mut _43: u64;
let _44: ();
let mut _45: i8;
let mut _46: u64;
let _47: ();
let mut _48: i16;
let mut _49: u64;
let _50: ();
let mut _51: i32;
let mut _52: u64;
let _53: ();
let mut _54: i64;
let mut _55: u64;
let _56: ();
let mut _57: f32;
let mut _58: u64;
let _59: ();
let mut _60: f64;
let mut _61: u64;
let _62: ();
let mut _63: u8;
let mut _64: f64;
let _65: ();
let mut _66: u16;
let mut _67: f64;
let _68: ();
let mut _69: u32;
let mut _70: f64;
let _71: ();
let mut _72: u64;
let mut _73: f64;
let _74: ();
let mut _75: i8;
let mut _76: f64;
let _77: ();
let mut _78: i16;
let mut _79: f64;
let _80: ();
let mut _81: i32;
let mut _82: f64;
let _83: ();
let mut _84: i64;
let mut _85: f64;
let _86: ();
let mut _87: f32;
let mut _88: f64;
let _89: ();
let mut _90: f64;
scope 1 {
debug i => _1;
let _2: u64;
scope 2 {
debug u => _2;
let _3: f64;
scope 3 {
debug f => _3;
}
}
}
bb0: {
2023-04-12 13:39:56 -05:00
- StorageLive(_1);
+ nop;
2023-03-20 13:05:07 -05:00
_1 = const 1_i64;
2023-04-12 13:39:56 -05:00
- StorageLive(_2);
+ nop;
2023-03-20 13:05:07 -05:00
_2 = const 1_u64;
2023-04-12 13:39:56 -05:00
- StorageLive(_3);
+ nop;
2023-03-20 13:05:07 -05:00
_3 = const 1f64;
StorageLive(_4);
StorageLive(_5);
StorageLive(_6);
2023-03-20 13:05:07 -05:00
- _6 = copy _1;
- _5 = move _6 as u8 (IntToInt);
+ _6 = const 1_i64;
2023-09-19 15:12:48 -05:00
+ _5 = const 1_u8;
StorageDead(_6);
2023-09-19 15:12:48 -05:00
- _4 = opaque::<u8>(move _5) -> [return: bb1, unwind continue];
+ _4 = opaque::<u8>(const 1_u8) -> [return: bb1, unwind continue];
2023-03-20 13:05:07 -05:00
}
bb1: {
StorageDead(_5);
StorageDead(_4);
StorageLive(_7);
StorageLive(_8);
StorageLive(_9);
2023-03-20 13:05:07 -05:00
- _9 = copy _1;
- _8 = move _9 as u16 (IntToInt);
+ _9 = const 1_i64;
2023-09-19 15:12:48 -05:00
+ _8 = const 1_u16;
StorageDead(_9);
2023-09-19 15:12:48 -05:00
- _7 = opaque::<u16>(move _8) -> [return: bb2, unwind continue];
+ _7 = opaque::<u16>(const 1_u16) -> [return: bb2, unwind continue];
2023-03-20 13:05:07 -05:00
}
bb2: {
StorageDead(_8);
StorageDead(_7);
StorageLive(_10);
StorageLive(_11);
StorageLive(_12);
2023-03-20 13:05:07 -05:00
- _12 = copy _1;
- _11 = move _12 as u32 (IntToInt);
+ _12 = const 1_i64;
2023-09-19 15:12:48 -05:00
+ _11 = const 1_u32;
StorageDead(_12);
2023-09-19 15:12:48 -05:00
- _10 = opaque::<u32>(move _11) -> [return: bb3, unwind continue];
+ _10 = opaque::<u32>(const 1_u32) -> [return: bb3, unwind continue];
2023-03-20 13:05:07 -05:00
}
bb3: {
StorageDead(_11);
StorageDead(_10);
StorageLive(_13);
StorageLive(_14);
StorageLive(_15);
2023-03-20 13:05:07 -05:00
- _15 = copy _1;
- _14 = move _15 as u64 (IntToInt);
+ _15 = const 1_i64;
2023-09-19 15:12:48 -05:00
+ _14 = const 1_u64;
StorageDead(_15);
2023-09-19 15:12:48 -05:00
- _13 = opaque::<u64>(move _14) -> [return: bb4, unwind continue];
+ _13 = opaque::<u64>(const 1_u64) -> [return: bb4, unwind continue];
2023-03-20 13:05:07 -05:00
}
bb4: {
StorageDead(_14);
StorageDead(_13);
StorageLive(_16);
StorageLive(_17);
StorageLive(_18);
2023-03-20 13:05:07 -05:00
- _18 = copy _1;
- _17 = move _18 as i8 (IntToInt);
+ _18 = const 1_i64;
2023-09-19 15:12:48 -05:00
+ _17 = const 1_i8;
StorageDead(_18);
2023-09-19 15:12:48 -05:00
- _16 = opaque::<i8>(move _17) -> [return: bb5, unwind continue];
+ _16 = opaque::<i8>(const 1_i8) -> [return: bb5, unwind continue];
2023-03-20 13:05:07 -05:00
}
bb5: {
StorageDead(_17);
StorageDead(_16);
StorageLive(_19);
StorageLive(_20);
StorageLive(_21);
2023-03-20 13:05:07 -05:00
- _21 = copy _1;
- _20 = move _21 as i16 (IntToInt);
+ _21 = const 1_i64;
2023-09-19 15:12:48 -05:00
+ _20 = const 1_i16;
StorageDead(_21);
2023-09-19 15:12:48 -05:00
- _19 = opaque::<i16>(move _20) -> [return: bb6, unwind continue];
+ _19 = opaque::<i16>(const 1_i16) -> [return: bb6, unwind continue];
2023-03-20 13:05:07 -05:00
}
bb6: {
StorageDead(_20);
StorageDead(_19);
StorageLive(_22);
StorageLive(_23);
StorageLive(_24);
2023-03-20 13:05:07 -05:00
- _24 = copy _1;
- _23 = move _24 as i32 (IntToInt);
+ _24 = const 1_i64;
2023-09-19 15:12:48 -05:00
+ _23 = const 1_i32;
StorageDead(_24);
2023-09-19 15:12:48 -05:00
- _22 = opaque::<i32>(move _23) -> [return: bb7, unwind continue];
+ _22 = opaque::<i32>(const 1_i32) -> [return: bb7, unwind continue];
2023-03-20 13:05:07 -05:00
}
bb7: {
StorageDead(_23);
StorageDead(_22);
StorageLive(_25);
StorageLive(_26);
2023-03-20 13:05:07 -05:00
- _26 = copy _1;
- _25 = opaque::<i64>(move _26) -> [return: bb8, unwind continue];
+ _26 = const 1_i64;
2023-03-20 13:05:07 -05:00
+ _25 = opaque::<i64>(const 1_i64) -> [return: bb8, unwind continue];
}
bb8: {
StorageDead(_26);
2023-03-20 13:05:07 -05:00
StorageDead(_25);
StorageLive(_27);
StorageLive(_28);
StorageLive(_29);
2023-03-20 13:05:07 -05:00
- _29 = copy _1;
- _28 = move _29 as f32 (IntToFloat);
+ _29 = const 1_i64;
2023-09-19 15:12:48 -05:00
+ _28 = const 1f32;
StorageDead(_29);
2023-09-19 15:12:48 -05:00
- _27 = opaque::<f32>(move _28) -> [return: bb9, unwind continue];
+ _27 = opaque::<f32>(const 1f32) -> [return: bb9, unwind continue];
2023-03-20 13:05:07 -05:00
}
bb9: {
StorageDead(_28);
StorageDead(_27);
StorageLive(_30);
StorageLive(_31);
StorageLive(_32);
2023-03-20 13:05:07 -05:00
- _32 = copy _1;
- _31 = move _32 as f64 (IntToFloat);
+ _32 = const 1_i64;
2023-09-19 15:12:48 -05:00
+ _31 = const 1f64;
StorageDead(_32);
2023-09-19 15:12:48 -05:00
- _30 = opaque::<f64>(move _31) -> [return: bb10, unwind continue];
+ _30 = opaque::<f64>(const 1f64) -> [return: bb10, unwind continue];
2023-03-20 13:05:07 -05:00
}
bb10: {
StorageDead(_31);
StorageDead(_30);
StorageLive(_33);
StorageLive(_34);
StorageLive(_35);
2023-03-20 13:05:07 -05:00
- _35 = copy _2;
- _34 = move _35 as u8 (IntToInt);
+ _35 = const 1_u64;
2023-09-19 15:12:48 -05:00
+ _34 = const 1_u8;
StorageDead(_35);
2023-09-19 15:12:48 -05:00
- _33 = opaque::<u8>(move _34) -> [return: bb11, unwind continue];
+ _33 = opaque::<u8>(const 1_u8) -> [return: bb11, unwind continue];
2023-03-20 13:05:07 -05:00
}
bb11: {
StorageDead(_34);
StorageDead(_33);
StorageLive(_36);
StorageLive(_37);
StorageLive(_38);
2023-03-20 13:05:07 -05:00
- _38 = copy _2;
- _37 = move _38 as u16 (IntToInt);
+ _38 = const 1_u64;
2023-09-19 15:12:48 -05:00
+ _37 = const 1_u16;
StorageDead(_38);
2023-09-19 15:12:48 -05:00
- _36 = opaque::<u16>(move _37) -> [return: bb12, unwind continue];
+ _36 = opaque::<u16>(const 1_u16) -> [return: bb12, unwind continue];
2023-03-20 13:05:07 -05:00
}
bb12: {
StorageDead(_37);
StorageDead(_36);
StorageLive(_39);
StorageLive(_40);
StorageLive(_41);
2023-03-20 13:05:07 -05:00
- _41 = copy _2;
- _40 = move _41 as u32 (IntToInt);
+ _41 = const 1_u64;
2023-09-19 15:12:48 -05:00
+ _40 = const 1_u32;
StorageDead(_41);
2023-09-19 15:12:48 -05:00
- _39 = opaque::<u32>(move _40) -> [return: bb13, unwind continue];
+ _39 = opaque::<u32>(const 1_u32) -> [return: bb13, unwind continue];
2023-03-20 13:05:07 -05:00
}
bb13: {
StorageDead(_40);
StorageDead(_39);
StorageLive(_42);
StorageLive(_43);
2023-03-20 13:05:07 -05:00
- _43 = copy _2;
- _42 = opaque::<u64>(move _43) -> [return: bb14, unwind continue];
+ _43 = const 1_u64;
2023-03-20 13:05:07 -05:00
+ _42 = opaque::<u64>(const 1_u64) -> [return: bb14, unwind continue];
}
bb14: {
StorageDead(_43);
2023-03-20 13:05:07 -05:00
StorageDead(_42);
StorageLive(_44);
StorageLive(_45);
StorageLive(_46);
2023-03-20 13:05:07 -05:00
- _46 = copy _2;
- _45 = move _46 as i8 (IntToInt);
+ _46 = const 1_u64;
2023-09-19 15:12:48 -05:00
+ _45 = const 1_i8;
StorageDead(_46);
2023-09-19 15:12:48 -05:00
- _44 = opaque::<i8>(move _45) -> [return: bb15, unwind continue];
+ _44 = opaque::<i8>(const 1_i8) -> [return: bb15, unwind continue];
2023-03-20 13:05:07 -05:00
}
bb15: {
StorageDead(_45);
StorageDead(_44);
StorageLive(_47);
StorageLive(_48);
StorageLive(_49);
2023-03-20 13:05:07 -05:00
- _49 = copy _2;
- _48 = move _49 as i16 (IntToInt);
+ _49 = const 1_u64;
2023-09-19 15:12:48 -05:00
+ _48 = const 1_i16;
StorageDead(_49);
2023-09-19 15:12:48 -05:00
- _47 = opaque::<i16>(move _48) -> [return: bb16, unwind continue];
+ _47 = opaque::<i16>(const 1_i16) -> [return: bb16, unwind continue];
2023-03-20 13:05:07 -05:00
}
bb16: {
StorageDead(_48);
StorageDead(_47);
StorageLive(_50);
StorageLive(_51);
StorageLive(_52);
2023-03-20 13:05:07 -05:00
- _52 = copy _2;
- _51 = move _52 as i32 (IntToInt);
+ _52 = const 1_u64;
2023-09-19 15:12:48 -05:00
+ _51 = const 1_i32;
StorageDead(_52);
2023-09-19 15:12:48 -05:00
- _50 = opaque::<i32>(move _51) -> [return: bb17, unwind continue];
+ _50 = opaque::<i32>(const 1_i32) -> [return: bb17, unwind continue];
2023-03-20 13:05:07 -05:00
}
bb17: {
StorageDead(_51);
StorageDead(_50);
StorageLive(_53);
StorageLive(_54);
StorageLive(_55);
2023-03-20 13:05:07 -05:00
- _55 = copy _2;
- _54 = move _55 as i64 (IntToInt);
+ _55 = const 1_u64;
2023-09-19 15:12:48 -05:00
+ _54 = const 1_i64;
StorageDead(_55);
2023-09-19 15:12:48 -05:00
- _53 = opaque::<i64>(move _54) -> [return: bb18, unwind continue];
+ _53 = opaque::<i64>(const 1_i64) -> [return: bb18, unwind continue];
2023-03-20 13:05:07 -05:00
}
bb18: {
StorageDead(_54);
StorageDead(_53);
StorageLive(_56);
StorageLive(_57);
StorageLive(_58);
2023-03-20 13:05:07 -05:00
- _58 = copy _2;
- _57 = move _58 as f32 (IntToFloat);
+ _58 = const 1_u64;
2023-09-19 15:12:48 -05:00
+ _57 = const 1f32;
StorageDead(_58);
2023-09-19 15:12:48 -05:00
- _56 = opaque::<f32>(move _57) -> [return: bb19, unwind continue];
+ _56 = opaque::<f32>(const 1f32) -> [return: bb19, unwind continue];
2023-03-20 13:05:07 -05:00
}
bb19: {
StorageDead(_57);
StorageDead(_56);
StorageLive(_59);
StorageLive(_60);
StorageLive(_61);
2023-03-20 13:05:07 -05:00
- _61 = copy _2;
- _60 = move _61 as f64 (IntToFloat);
+ _61 = const 1_u64;
2023-09-19 15:12:48 -05:00
+ _60 = const 1f64;
StorageDead(_61);
2023-09-19 15:12:48 -05:00
- _59 = opaque::<f64>(move _60) -> [return: bb20, unwind continue];
+ _59 = opaque::<f64>(const 1f64) -> [return: bb20, unwind continue];
2023-03-20 13:05:07 -05:00
}
bb20: {
StorageDead(_60);
StorageDead(_59);
StorageLive(_62);
StorageLive(_63);
StorageLive(_64);
2023-03-20 13:05:07 -05:00
- _64 = copy _3;
- _63 = move _64 as u8 (FloatToInt);
+ _64 = const 1f64;
2023-09-19 15:12:48 -05:00
+ _63 = const 1_u8;
StorageDead(_64);
2023-09-19 15:12:48 -05:00
- _62 = opaque::<u8>(move _63) -> [return: bb21, unwind continue];
+ _62 = opaque::<u8>(const 1_u8) -> [return: bb21, unwind continue];
2023-03-20 13:05:07 -05:00
}
bb21: {
StorageDead(_63);
StorageDead(_62);
StorageLive(_65);
StorageLive(_66);
StorageLive(_67);
2023-03-20 13:05:07 -05:00
- _67 = copy _3;
- _66 = move _67 as u16 (FloatToInt);
+ _67 = const 1f64;
2023-09-19 15:12:48 -05:00
+ _66 = const 1_u16;
StorageDead(_67);
2023-09-19 15:12:48 -05:00
- _65 = opaque::<u16>(move _66) -> [return: bb22, unwind continue];
+ _65 = opaque::<u16>(const 1_u16) -> [return: bb22, unwind continue];
2023-03-20 13:05:07 -05:00
}
bb22: {
StorageDead(_66);
StorageDead(_65);
StorageLive(_68);
StorageLive(_69);
StorageLive(_70);
2023-03-20 13:05:07 -05:00
- _70 = copy _3;
- _69 = move _70 as u32 (FloatToInt);
+ _70 = const 1f64;
2023-09-19 15:12:48 -05:00
+ _69 = const 1_u32;
StorageDead(_70);
2023-09-19 15:12:48 -05:00
- _68 = opaque::<u32>(move _69) -> [return: bb23, unwind continue];
+ _68 = opaque::<u32>(const 1_u32) -> [return: bb23, unwind continue];
2023-03-20 13:05:07 -05:00
}
bb23: {
StorageDead(_69);
StorageDead(_68);
StorageLive(_71);
StorageLive(_72);
StorageLive(_73);
2023-03-20 13:05:07 -05:00
- _73 = copy _3;
- _72 = move _73 as u64 (FloatToInt);
+ _73 = const 1f64;
2023-09-19 15:12:48 -05:00
+ _72 = const 1_u64;
StorageDead(_73);
2023-09-19 15:12:48 -05:00
- _71 = opaque::<u64>(move _72) -> [return: bb24, unwind continue];
+ _71 = opaque::<u64>(const 1_u64) -> [return: bb24, unwind continue];
2023-03-20 13:05:07 -05:00
}
bb24: {
StorageDead(_72);
StorageDead(_71);
StorageLive(_74);
StorageLive(_75);
StorageLive(_76);
2023-03-20 13:05:07 -05:00
- _76 = copy _3;
- _75 = move _76 as i8 (FloatToInt);
+ _76 = const 1f64;
2023-09-19 15:12:48 -05:00
+ _75 = const 1_i8;
StorageDead(_76);
2023-09-19 15:12:48 -05:00
- _74 = opaque::<i8>(move _75) -> [return: bb25, unwind continue];
+ _74 = opaque::<i8>(const 1_i8) -> [return: bb25, unwind continue];
2023-03-20 13:05:07 -05:00
}
bb25: {
StorageDead(_75);
StorageDead(_74);
StorageLive(_77);
StorageLive(_78);
StorageLive(_79);
2023-03-20 13:05:07 -05:00
- _79 = copy _3;
- _78 = move _79 as i16 (FloatToInt);
+ _79 = const 1f64;
2023-09-19 15:12:48 -05:00
+ _78 = const 1_i16;
StorageDead(_79);
2023-09-19 15:12:48 -05:00
- _77 = opaque::<i16>(move _78) -> [return: bb26, unwind continue];
+ _77 = opaque::<i16>(const 1_i16) -> [return: bb26, unwind continue];
2023-03-20 13:05:07 -05:00
}
bb26: {
StorageDead(_78);
StorageDead(_77);
StorageLive(_80);
StorageLive(_81);
StorageLive(_82);
2023-03-20 13:05:07 -05:00
- _82 = copy _3;
- _81 = move _82 as i32 (FloatToInt);
+ _82 = const 1f64;
2023-09-19 15:12:48 -05:00
+ _81 = const 1_i32;
StorageDead(_82);
2023-09-19 15:12:48 -05:00
- _80 = opaque::<i32>(move _81) -> [return: bb27, unwind continue];
+ _80 = opaque::<i32>(const 1_i32) -> [return: bb27, unwind continue];
2023-03-20 13:05:07 -05:00
}
bb27: {
StorageDead(_81);
StorageDead(_80);
StorageLive(_83);
StorageLive(_84);
StorageLive(_85);
2023-03-20 13:05:07 -05:00
- _85 = copy _3;
- _84 = move _85 as i64 (FloatToInt);
+ _85 = const 1f64;
2023-09-19 15:12:48 -05:00
+ _84 = const 1_i64;
StorageDead(_85);
2023-09-19 15:12:48 -05:00
- _83 = opaque::<i64>(move _84) -> [return: bb28, unwind continue];
+ _83 = opaque::<i64>(const 1_i64) -> [return: bb28, unwind continue];
2023-03-20 13:05:07 -05:00
}
bb28: {
StorageDead(_84);
StorageDead(_83);
StorageLive(_86);
StorageLive(_87);
StorageLive(_88);
2023-03-20 13:05:07 -05:00
- _88 = copy _3;
- _87 = move _88 as f32 (FloatToFloat);
+ _88 = const 1f64;
2023-09-19 15:12:48 -05:00
+ _87 = const 1f32;
StorageDead(_88);
2023-09-19 15:12:48 -05:00
- _86 = opaque::<f32>(move _87) -> [return: bb29, unwind continue];
+ _86 = opaque::<f32>(const 1f32) -> [return: bb29, unwind continue];
2023-03-20 13:05:07 -05:00
}
bb29: {
StorageDead(_87);
StorageDead(_86);
StorageLive(_89);
StorageLive(_90);
2023-03-20 13:05:07 -05:00
- _90 = copy _3;
- _89 = opaque::<f64>(move _90) -> [return: bb30, unwind continue];
+ _90 = const 1f64;
2023-03-20 13:05:07 -05:00
+ _89 = opaque::<f64>(const 1f64) -> [return: bb30, unwind continue];
}
bb30: {
StorageDead(_90);
2023-03-20 13:05:07 -05:00
StorageDead(_89);
_0 = const ();
2023-04-12 13:39:56 -05:00
- StorageDead(_3);
- StorageDead(_2);
- StorageDead(_1);
+ nop;
+ nop;
+ nop;
2023-03-20 13:05:07 -05:00
return;
}
}