fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.7 KiB68 linesraw
1// MIR for `checked_shl` after PreCodegen
2
3fn checked_shl(_1: u32, _2: u32) -> Option<u32> {
4    debug x => _1;
5    debug rhs => _2;
6    let mut _0: std::option::Option<u32>;
7    scope 1 (inlined core::num::<impl u32>::checked_shl) {
8        debug self => _1;
9        debug rhs => _2;
10        let mut _6: bool;
11        scope 2 {
12            debug a => _4;
13            debug b => _5;
14        }
15        scope 3 (inlined core::num::<impl u32>::overflowing_shl) {
16            debug self => _1;
17            debug rhs => _2;
18            let mut _4: u32;
19            let mut _5: bool;
20            scope 4 (inlined core::num::<impl u32>::wrapping_shl) {
21                debug self => _1;
22                debug rhs => _2;
23                let mut _3: u32;
24                scope 5 {
25                    scope 6 (inlined core::num::<impl u32>::unchecked_shl) {
26                        debug self => _1;
27                        debug rhs => _3;
28                        scope 7 {
29                        }
30                    }
31                }
32            }
33        }
34    }
35
36    bb0: {
37        StorageLive(_4);
38        StorageLive(_5);
39        StorageLive(_3);
40        _3 = BitAnd(_2, const 31_u32);
41        _4 = ShlUnchecked(_1, _3);
42        StorageDead(_3);
43        _5 = Ge(_2, const _);
44        StorageLive(_6);
45        _6 = unlikely(move _5) -> [return: bb1, unwind unreachable];
46    }
47
48    bb1: {
49        switchInt(move _6) -> [0: bb2, otherwise: bb3];
50    }
51
52    bb2: {
53        _0 = Option::<u32>::Some(_4);
54        goto -> bb4;
55    }
56
57    bb3: {
58        _0 = Option::<u32>::None;
59        goto -> bb4;
60    }
61
62    bb4: {
63        StorageDead(_6);
64        StorageDead(_5);
65        StorageDead(_4);
66        return;
67    }
68}