]> git.proxmox.com Git - rustc.git/blame - tests/mir-opt/pre-codegen/range_iter.inclusive_loop.PreCodegen.after.panic-unwind.mir
New upstream version 1.73.0+dfsg1
[rustc.git] / tests / mir-opt / pre-codegen / range_iter.inclusive_loop.PreCodegen.after.panic-unwind.mir
CommitLineData
fe692bf9
FG
1// MIR for `inclusive_loop` after PreCodegen
2
3fn inclusive_loop(_1: u32, _2: u32, _3: impl Fn(u32)) -> () {
4 debug start => _1;
5 debug end => _2;
6 debug f => _3;
7 let mut _0: ();
8 let mut _4: std::ops::RangeInclusive<u32>;
9 let mut _5: std::ops::RangeInclusive<u32>;
10 let mut _6: &mut std::ops::RangeInclusive<u32>;
11 let mut _7: std::option::Option<u32>;
12 let mut _8: isize;
13 let mut _10: &impl Fn(u32);
14 let mut _11: (u32,);
15 let _12: ();
16 scope 1 {
17 debug iter => _5;
18 let _9: u32;
19 scope 2 {
20 debug x => _9;
21 }
22 scope 5 (inlined iter::range::<impl Iterator for RangeInclusive<u32>>::next) {
23 debug self => _6;
24 }
25 }
26 scope 3 (inlined RangeInclusive::<u32>::new) {
27 debug start => _1;
28 debug end => _2;
29 }
30 scope 4 (inlined <RangeInclusive<u32> as IntoIterator>::into_iter) {
31 debug self => _4;
32 }
33
34 bb0: {
35 _4 = RangeInclusive::<u32> { start: _1, end: _2, exhausted: const false };
36 StorageLive(_5);
37 _5 = move _4;
38 goto -> bb1;
39 }
40
41 bb1: {
42 StorageLive(_7);
add651ee 43 StorageLive(_6);
fe692bf9 44 _6 = &mut _5;
add651ee 45 _7 = <RangeInclusive<u32> as iter::range::RangeInclusiveIteratorImpl>::spec_next(move _6) -> [return: bb2, unwind: bb8];
fe692bf9
FG
46 }
47
48 bb2: {
add651ee 49 StorageDead(_6);
fe692bf9
FG
50 _8 = discriminant(_7);
51 switchInt(move _8) -> [0: bb3, 1: bb5, otherwise: bb7];
52 }
53
54 bb3: {
55 StorageDead(_7);
56 StorageDead(_5);
57 drop(_3) -> [return: bb4, unwind continue];
58 }
59
60 bb4: {
61 return;
62 }
63
64 bb5: {
65 _9 = ((_7 as Some).0: u32);
66 StorageLive(_10);
67 _10 = &_3;
68 StorageLive(_11);
69 _11 = (_9,);
70 _12 = <impl Fn(u32) as Fn<(u32,)>>::call(move _10, move _11) -> [return: bb6, unwind: bb8];
71 }
72
73 bb6: {
74 StorageDead(_11);
75 StorageDead(_10);
76 StorageDead(_7);
77 goto -> bb1;
78 }
79
80 bb7: {
81 unreachable;
82 }
83
84 bb8 (cleanup): {
85 drop(_3) -> [return: bb9, unwind terminate];
86 }
87
88 bb9 (cleanup): {
89 resume;
90 }
91}