summary refs log tree commit diff
path: root/src/test/mir-opt/const_prop/aggregate/rustc.main.ConstProp.diff
blob: f4b6c7db444e5a11c52c2a15cbfc5d5919f5cbb2 (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
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
- // MIR for `main` before ConstProp
+ // MIR for `main` after ConstProp
  
  fn main() -> () {
      let mut _0: ();                      // return place in scope 0 at $DIR/aggregate.rs:4:11: 4:11
      let _1: i32;                         // in scope 0 at $DIR/aggregate.rs:5:9: 5:10
      let mut _2: i32;                     // in scope 0 at $DIR/aggregate.rs:5:13: 5:24
      let mut _3: (i32, i32, i32);         // in scope 0 at $DIR/aggregate.rs:5:13: 5:22
      scope 1 {
          debug x => _1;                   // in scope 1 at $DIR/aggregate.rs:5:9: 5:10
      }
  
      bb0: {
          StorageLive(_1);                 // scope 0 at $DIR/aggregate.rs:5:9: 5:10
          StorageLive(_2);                 // scope 0 at $DIR/aggregate.rs:5:13: 5:24
          StorageLive(_3);                 // scope 0 at $DIR/aggregate.rs:5:13: 5:22
          _3 = (const 0i32, const 1i32, const 2i32); // scope 0 at $DIR/aggregate.rs:5:13: 5:22
                                           // ty::Const
                                           // + ty: i32
                                           // + val: Value(Scalar(0x00000000))
                                           // mir::Constant
                                           // + span: $DIR/aggregate.rs:5:14: 5:15
                                           // + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) }
                                           // ty::Const
                                           // + ty: i32
                                           // + val: Value(Scalar(0x00000001))
                                           // mir::Constant
                                           // + span: $DIR/aggregate.rs:5:17: 5:18
                                           // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
                                           // ty::Const
                                           // + ty: i32
                                           // + val: Value(Scalar(0x00000002))
                                           // mir::Constant
                                           // + span: $DIR/aggregate.rs:5:20: 5:21
                                           // + literal: Const { ty: i32, val: Value(Scalar(0x00000002)) }
-         _2 = (_3.1: i32);                // scope 0 at $DIR/aggregate.rs:5:13: 5:24
-         _1 = Add(move _2, const 0i32);   // scope 0 at $DIR/aggregate.rs:5:13: 5:28
+         _2 = const 1i32;                 // scope 0 at $DIR/aggregate.rs:5:13: 5:24
                                           // ty::Const
                                           // + ty: i32
-                                          // + val: Value(Scalar(0x00000000))
+                                          // + val: Value(Scalar(0x00000001))
                                           // mir::Constant
-                                          // + span: $DIR/aggregate.rs:5:27: 5:28
-                                          // + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) }
+                                          // + span: $DIR/aggregate.rs:5:13: 5:24
+                                          // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
+         _1 = const 1i32;                 // scope 0 at $DIR/aggregate.rs:5:13: 5:28
+                                          // ty::Const
+                                          // + ty: i32
+                                          // + val: Value(Scalar(0x00000001))
+                                          // mir::Constant
+                                          // + span: $DIR/aggregate.rs:5:13: 5:28
+                                          // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
          StorageDead(_2);                 // scope 0 at $DIR/aggregate.rs:5:27: 5:28
          StorageDead(_3);                 // scope 0 at $DIR/aggregate.rs:5:28: 5:29
          _0 = const ();                   // scope 0 at $DIR/aggregate.rs:4:11: 6:2
                                           // ty::Const
                                           // + ty: ()
                                           // + val: Value(Scalar(<ZST>))
                                           // mir::Constant
                                           // + span: $DIR/aggregate.rs:4:11: 6:2
                                           // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
          StorageDead(_1);                 // scope 0 at $DIR/aggregate.rs:6:1: 6:2
          return;                          // scope 0 at $DIR/aggregate.rs:6:2: 6:2
      }
  }