summaryrefslogtreecommitdiff
path: root/tests/mir-opt/combine_transmutes.identity_transmutes.InstCombine.diff
blob: ae1185c7f712faf0cfd833f5bf662a39cc6be7a3 (plain)
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
- // MIR for `identity_transmutes` before InstCombine
+ // MIR for `identity_transmutes` after InstCombine
  
  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
      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
          scope 2 {
              debug _a => _2;              // in scope 2 at $DIR/combine_transmutes.rs:+3:9: +3:11
          }
      }
  
      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>) }
      }
  
      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
      }
  
      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
      }
  }