diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2023-03-11 15:27:44 +0000 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2023-07-10 16:01:18 +0000 |
| commit | b74a144a5fcee833cdcc7ae6c5937f8dbe7f2e80 (patch) | |
| tree | d1539478bcb76bfe8d421da22a6c95993485aaca /tests/mir-opt/pre-codegen/loops.int_range.PreCodegen.after.mir | |
| parent | 341e0f78d1a59e8c9e92016e2ae4ebaabd291d0f (diff) | |
| download | rust-b74a144a5fcee833cdcc7ae6c5937f8dbe7f2e80.tar.gz rust-b74a144a5fcee833cdcc7ae6c5937f8dbe7f2e80.zip | |
Enable by default.
Diffstat (limited to 'tests/mir-opt/pre-codegen/loops.int_range.PreCodegen.after.mir')
| -rw-r--r-- | tests/mir-opt/pre-codegen/loops.int_range.PreCodegen.after.mir | 87 |
1 files changed, 39 insertions, 48 deletions
diff --git a/tests/mir-opt/pre-codegen/loops.int_range.PreCodegen.after.mir b/tests/mir-opt/pre-codegen/loops.int_range.PreCodegen.after.mir index 40bb3a37c58..b696585b233 100644 --- a/tests/mir-opt/pre-codegen/loops.int_range.PreCodegen.after.mir +++ b/tests/mir-opt/pre-codegen/loops.int_range.PreCodegen.after.mir @@ -6,35 +6,33 @@ fn int_range(_1: usize, _2: usize) -> () { let mut _0: (); let mut _3: std::ops::Range<usize>; let mut _4: std::ops::Range<usize>; - let mut _5: &mut std::ops::Range<usize>; - let mut _11: std::option::Option<usize>; - let mut _14: isize; - let _16: (); + let mut _8: std::option::Option<usize>; + let mut _11: isize; + let _13: (); + let mut _14: &mut std::ops::Range<usize>; scope 1 { debug iter => _4; - let _15: usize; + let _12: usize; scope 2 { - debug i => _15; + debug i => _12; } scope 4 (inlined iter::range::<impl Iterator for std::ops::Range<usize>>::next) { - debug self => _5; + debug self => &_4; scope 5 (inlined <std::ops::Range<usize> as iter::range::RangeIteratorImpl>::spec_next) { - debug self => _5; - let mut _6: &usize; - let mut _7: &usize; - let mut _10: bool; - let _12: usize; - let mut _13: usize; + debug self => &_4; + let mut _7: bool; + let _9: usize; + let mut _10: usize; scope 6 { - debug old => _12; + debug old => _9; scope 7 { } } scope 8 (inlined cmp::impls::<impl PartialOrd for usize>::lt) { - debug self => _6; - debug other => _7; - let mut _8: usize; - let mut _9: usize; + debug self => &((*_14).0: usize); + debug other => &((*_14).1: usize); + let mut _5: usize; + let mut _6: usize; } } } @@ -51,64 +49,57 @@ fn int_range(_1: usize, _2: usize) -> () { } bb1: { - StorageLive(_11); - _5 = &mut _4; - StorageLive(_12); - StorageLive(_10); - StorageLive(_6); - _6 = &((*_5).0: usize); - StorageLive(_7); - _7 = &((*_5).1: usize); StorageLive(_8); - _8 = (*_6); StorageLive(_9); - _9 = (*_7); - _10 = Lt(move _8, move _9); - StorageDead(_9); - StorageDead(_8); - StorageDead(_7); + StorageLive(_7); + StorageLive(_5); + _5 = (_4.0: usize); + StorageLive(_6); + _6 = (_4.1: usize); + _7 = Lt(move _5, move _6); StorageDead(_6); - switchInt(move _10) -> [0: bb2, otherwise: bb3]; + StorageDead(_5); + switchInt(move _7) -> [0: bb2, otherwise: bb3]; } bb2: { - _11 = Option::<usize>::None; + _8 = Option::<usize>::None; goto -> bb5; } bb3: { - _12 = ((*_5).0: usize); - StorageLive(_13); - _13 = <usize as Step>::forward_unchecked(_12, const 1_usize) -> [return: bb4, unwind continue]; + _9 = (_4.0: usize); + StorageLive(_10); + _10 = <usize as Step>::forward_unchecked(_9, const 1_usize) -> [return: bb4, unwind continue]; } bb4: { - ((*_5).0: usize) = move _13; - StorageDead(_13); - _11 = Option::<usize>::Some(_12); + (_4.0: usize) = move _10; + StorageDead(_10); + _8 = Option::<usize>::Some(_9); goto -> bb5; } bb5: { - StorageDead(_10); - StorageDead(_12); - _14 = discriminant(_11); - switchInt(move _14) -> [0: bb6, 1: bb7, otherwise: bb9]; + StorageDead(_7); + StorageDead(_9); + _11 = discriminant(_8); + switchInt(move _11) -> [0: bb6, 1: bb7, otherwise: bb9]; } bb6: { - StorageDead(_11); + StorageDead(_8); StorageDead(_4); return; } bb7: { - _15 = ((_11 as Some).0: usize); - _16 = opaque::<usize>(_15) -> [return: bb8, unwind continue]; + _12 = ((_8 as Some).0: usize); + _13 = opaque::<usize>(_12) -> [return: bb8, unwind continue]; } bb8: { - StorageDead(_11); + StorageDead(_8); goto -> bb1; } |
