]> git.proxmox.com Git - rustc.git/blob - src/test/mir-opt/const_prop/scalar_literal_propagation/rustc.main.ConstProp.diff
New upstream version 1.46.0~beta.2+dfsg1
[rustc.git] / src / test / mir-opt / const_prop / scalar_literal_propagation / rustc.main.ConstProp.diff
1 - // MIR for `main` before ConstProp
2 + // MIR for `main` after ConstProp
3
4 fn main() -> () {
5 let mut _0: (); // return place in scope 0 at $DIR/scalar_literal_propagation.rs:2:11: 2:11
6 let _1: u32; // in scope 0 at $DIR/scalar_literal_propagation.rs:3:9: 3:10
7 let _2: (); // in scope 0 at $DIR/scalar_literal_propagation.rs:4:5: 4:15
8 let mut _3: u32; // in scope 0 at $DIR/scalar_literal_propagation.rs:4:13: 4:14
9 scope 1 {
10 debug x => _1; // in scope 1 at $DIR/scalar_literal_propagation.rs:3:9: 3:10
11 }
12
13 bb0: {
14 StorageLive(_1); // scope 0 at $DIR/scalar_literal_propagation.rs:3:9: 3:10
15 _1 = const 1_u32; // scope 0 at $DIR/scalar_literal_propagation.rs:3:13: 3:14
16 // ty::Const
17 // + ty: u32
18 // + val: Value(Scalar(0x00000001))
19 // mir::Constant
20 // + span: $DIR/scalar_literal_propagation.rs:3:13: 3:14
21 // + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) }
22 StorageLive(_2); // scope 1 at $DIR/scalar_literal_propagation.rs:4:5: 4:15
23 StorageLive(_3); // scope 1 at $DIR/scalar_literal_propagation.rs:4:13: 4:14
24 - _3 = _1; // scope 1 at $DIR/scalar_literal_propagation.rs:4:13: 4:14
25 - _2 = const consume(move _3) -> bb1; // scope 1 at $DIR/scalar_literal_propagation.rs:4:5: 4:15
26 + _3 = const 1_u32; // scope 1 at $DIR/scalar_literal_propagation.rs:4:13: 4:14
27 // ty::Const
28 + // + ty: u32
29 + // + val: Value(Scalar(0x00000001))
30 + // mir::Constant
31 + // + span: $DIR/scalar_literal_propagation.rs:4:13: 4:14
32 + // + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) }
33 + _2 = const consume(const 1_u32) -> bb1; // scope 1 at $DIR/scalar_literal_propagation.rs:4:5: 4:15
34 + // ty::Const
35 // + ty: fn(u32) {consume}
36 // + val: Value(Scalar(<ZST>))
37 // mir::Constant
38 // + span: $DIR/scalar_literal_propagation.rs:4:5: 4:12
39 // + literal: Const { ty: fn(u32) {consume}, val: Value(Scalar(<ZST>)) }
40 + // ty::Const
41 + // + ty: u32
42 + // + val: Value(Scalar(0x00000001))
43 + // mir::Constant
44 + // + span: $DIR/scalar_literal_propagation.rs:4:5: 4:15
45 + // + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) }
46 }
47
48 bb1: {
49 StorageDead(_3); // scope 1 at $DIR/scalar_literal_propagation.rs:4:14: 4:15
50 StorageDead(_2); // scope 1 at $DIR/scalar_literal_propagation.rs:4:15: 4:16
51 _0 = const (); // scope 0 at $DIR/scalar_literal_propagation.rs:2:11: 5:2
52 // ty::Const
53 // + ty: ()
54 // + val: Value(Scalar(<ZST>))
55 // mir::Constant
56 // + span: $DIR/scalar_literal_propagation.rs:2:11: 5:2
57 // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
58 StorageDead(_1); // scope 0 at $DIR/scalar_literal_propagation.rs:5:1: 5:2
59 return; // scope 0 at $DIR/scalar_literal_propagation.rs:5:2: 5:2
60 }
61 }
62