summary refs log tree commit diff
path: root/src/test/mir-opt/issue-41697/32bit/rustc.{{impl}}-{{constant}}.SimplifyCfg-qualify-consts.after.mir
blob: d263b2515f17a5267e9b449c814378961751f389 (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
// MIR for `<impl at $DIR/issue-41697.rs:18:1: 22:2>::{{constant}}#0` after SimplifyCfg-qualify-consts

<impl at $DIR/issue-41697.rs:18:1: 22:2>::{{constant}}#0: usize = {
    let mut _0: usize;                   // return place in scope 0 at $DIR/issue-41697.rs:18:19: 18:22
    let mut _1: (usize, bool);           // in scope 0 at $DIR/issue-41697.rs:18:19: 18:22

    bb0: {
        _1 = CheckedAdd(const 1usize, const 1usize); // scope 0 at $DIR/issue-41697.rs:18:19: 18:22
                                         // ty::Const
                                         // + ty: usize
                                         // + val: Value(Scalar(0x00000001))
                                         // mir::Constant
                                         // + span: $DIR/issue-41697.rs:18:19: 18:20
                                         // + literal: Const { ty: usize, val: Value(Scalar(0x00000001)) }
                                         // ty::Const
                                         // + ty: usize
                                         // + val: Value(Scalar(0x00000001))
                                         // mir::Constant
                                         // + span: $DIR/issue-41697.rs:18:21: 18:22
                                         // + literal: Const { ty: usize, val: Value(Scalar(0x00000001)) }
        assert(!move (_1.1: bool), "attempt to add with overflow") -> [success: bb2, unwind: bb1]; // scope 0 at $DIR/issue-41697.rs:18:19: 18:22
    }

    bb1 (cleanup): {
        resume;                          // scope 0 at $DIR/issue-41697.rs:18:19: 18:22
    }

    bb2: {
        _0 = move (_1.0: usize);         // scope 0 at $DIR/issue-41697.rs:18:19: 18:22
        return;                          // scope 0 at $DIR/issue-41697.rs:18:19: 18:22
    }
}