fork/rust

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

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

master
2.4 KiB63 linesraw
1// MIR for `mem_replace` after PreCodegen
2
3fn mem_replace(_1: &mut u32, _2: u32) -> u32 {
4    debug r => _1;
5    debug v => _2;
6    let mut _0: u32;
7    scope 1 (inlined std::mem::replace::<u32>) {
8        debug dest => _1;
9        debug src => _2;
10        scope 2 {
11            scope 3 {
12                debug result => _0;
13                scope 16 (inlined std::ptr::write::<u32>) {
14                    debug dst => _1;
15                    debug src => _2;
16                    scope 17 {
17                    }
18                }
19            }
20            scope 4 (inlined std::ptr::read::<u32>) {
21                debug src => _1;
22                scope 5 {
23                    scope 6 (inlined std::ptr::read::runtime::<u32>) {
24                        debug src => _1;
25                        scope 7 (inlined intrinsics::is_aligned_and_not_null::<u32>) {
26                            debug ptr => _1;
27                            scope 8 (inlined ptr::const_ptr::<impl *const u32>::is_null) {
28                                debug self => _1;
29                                let mut _3: *const u8;
30                                scope 9 {
31                                    scope 10 (inlined ptr::const_ptr::<impl *const T>::is_null::runtime_impl) {
32                                        debug ptr => _3;
33                                        scope 11 (inlined ptr::const_ptr::<impl *const u8>::addr) {
34                                            debug self => _3;
35                                            scope 12 {
36                                                scope 13 (inlined ptr::const_ptr::<impl *const u8>::cast::<()>) {
37                                                    debug self => _3;
38                                                }
39                                            }
40                                        }
41                                    }
42                                }
43                            }
44                            scope 14 (inlined ptr::const_ptr::<impl *const u32>::is_aligned) {
45                                debug self => _1;
46                                scope 15 (inlined align_of::<u32>) {
47                                }
48                            }
49                        }
50                    }
51                }
52            }
53        }
54    }
55
56    bb0: {
57        StorageLive(_3);
58        _0 = (*_1);
59        StorageDead(_3);
60        (*_1) = _2;
61        return;
62    }
63}