diff options
Diffstat (limited to '')
-rw-r--r-- | tests/mir-opt/combine_transmutes.identity_transmutes.InstSimplify.diff | 44 |
1 files changed, 20 insertions, 24 deletions
diff --git a/tests/mir-opt/combine_transmutes.identity_transmutes.InstSimplify.diff b/tests/mir-opt/combine_transmutes.identity_transmutes.InstSimplify.diff index 57d9f4b14..58ae59190 100644 --- a/tests/mir-opt/combine_transmutes.identity_transmutes.InstSimplify.diff +++ b/tests/mir-opt/combine_transmutes.identity_transmutes.InstSimplify.diff @@ -2,42 +2,38 @@ + // MIR for `identity_transmutes` after InstSimplify fn identity_transmutes() -> () { - let mut _0: (); // return place in scope 0 at $DIR/combine_transmutes.rs:+0:37: +0:37 - let _1: i32; // in scope 0 at $DIR/combine_transmutes.rs:+2:9: +2:11 - let mut _3: std::vec::Vec<i32>; // in scope 0 at $DIR/combine_transmutes.rs:+3:46: +3:56 + let mut _0: (); + let _1: i32; + let mut _3: std::vec::Vec<i32>; scope 1 { - debug _a => _1; // in scope 1 at $DIR/combine_transmutes.rs:+2:9: +2:11 - let _2: std::vec::Vec<i32>; // in scope 1 at $DIR/combine_transmutes.rs:+3:9: +3:11 + debug _a => _1; + let _2: std::vec::Vec<i32>; scope 2 { - debug _a => _2; // in scope 2 at $DIR/combine_transmutes.rs:+3:9: +3:11 + debug _a => _2; } } bb0: { - StorageLive(_1); // scope 0 at $DIR/combine_transmutes.rs:+2:9: +2:11 -- _1 = const 1_i32 as i32 (Transmute); // scope 0 at $DIR/combine_transmutes.rs:+2:14: +2:38 -+ _1 = const 1_i32; // scope 0 at $DIR/combine_transmutes.rs:+2:14: +2:38 - StorageLive(_2); // scope 1 at $DIR/combine_transmutes.rs:+3:9: +3:11 - StorageLive(_3); // scope 1 at $DIR/combine_transmutes.rs:+3:46: +3:56 - _3 = Vec::<i32>::new() -> [return: bb1, unwind unreachable]; // scope 1 at $DIR/combine_transmutes.rs:+3:46: +3:56 - // mir::Constant - // + span: $DIR/combine_transmutes.rs:15:46: 15:54 - // + user_ty: UserType(0) - // + literal: Const { ty: fn() -> Vec<i32> {Vec::<i32>::new}, val: Value(<ZST>) } + StorageLive(_1); +- _1 = const 1_i32 as i32 (Transmute); ++ _1 = const 1_i32; + StorageLive(_2); + StorageLive(_3); + _3 = Vec::<i32>::new() -> [return: bb1, unwind unreachable]; } bb1: { -- _2 = move _3 as std::vec::Vec<i32> (Transmute); // scope 1 at $DIR/combine_transmutes.rs:+3:14: +3:57 -+ _2 = move _3; // scope 1 at $DIR/combine_transmutes.rs:+3:14: +3:57 - StorageDead(_3); // scope 1 at $DIR/combine_transmutes.rs:+3:56: +3:57 - _0 = const (); // scope 0 at $DIR/combine_transmutes.rs:+0:37: +4:2 - drop(_2) -> [return: bb2, unwind unreachable]; // scope 1 at $DIR/combine_transmutes.rs:+4:1: +4:2 +- _2 = move _3 as std::vec::Vec<i32> (Transmute); ++ _2 = move _3; + StorageDead(_3); + _0 = const (); + drop(_2) -> [return: bb2, unwind unreachable]; } bb2: { - StorageDead(_2); // scope 1 at $DIR/combine_transmutes.rs:+4:1: +4:2 - StorageDead(_1); // scope 0 at $DIR/combine_transmutes.rs:+4:1: +4:2 - return; // scope 0 at $DIR/combine_transmutes.rs:+4:2: +4:2 + StorageDead(_2); + StorageDead(_1); + return; } } |