Skip to content

Commit

Permalink
ignore wasm=32 & bless
Browse files Browse the repository at this point in the history
  • Loading branch information
ouz-a committed Jul 12, 2022
1 parent cb0017f commit b4c3a2a
Show file tree
Hide file tree
Showing 4 changed files with 133 additions and 130 deletions.
132 changes: 66 additions & 66 deletions src/test/mir-opt/derefer_complex_case.main.Derefer.diff
Original file line number Diff line number Diff line change
Expand Up @@ -2,110 +2,110 @@
+ // MIR for `main` after Derefer

fn main() -> () {
let mut _0: (); // return place in scope 0 at $DIR/derefer_complex_case.rs:3:11: 3:11
let mut _1: std::slice::Iter<i32>; // in scope 0 at $DIR/derefer_complex_case.rs:4:17: 4:26
let mut _2: &[i32; 2]; // in scope 0 at $DIR/derefer_complex_case.rs:4:17: 4:26
let _3: [i32; 2]; // in scope 0 at $DIR/derefer_complex_case.rs:4:18: 4:26
let mut _4: std::slice::Iter<i32>; // in scope 0 at $DIR/derefer_complex_case.rs:4:17: 4:26
let mut _5: (); // in scope 0 at $DIR/derefer_complex_case.rs:3:1: 5:2
let _6: (); // in scope 0 at $DIR/derefer_complex_case.rs:4:17: 4:26
let mut _7: std::option::Option<&i32>; // in scope 0 at $DIR/derefer_complex_case.rs:4:17: 4:26
let mut _8: &mut std::slice::Iter<i32>; // in scope 0 at $DIR/derefer_complex_case.rs:4:17: 4:26
let mut _9: &mut std::slice::Iter<i32>; // in scope 0 at $DIR/derefer_complex_case.rs:4:17: 4:26
let mut _10: isize; // in scope 0 at $DIR/derefer_complex_case.rs:4:5: 4:40
let mut _11: !; // in scope 0 at $DIR/derefer_complex_case.rs:4:5: 4:40
let mut _13: i32; // in scope 0 at $DIR/derefer_complex_case.rs:4:34: 4:37
let mut _14: &[i32; 2]; // in scope 0 at $DIR/derefer_complex_case.rs:4:17: 4:26
+ let mut _15: &i32; // in scope 0 at $DIR/derefer_complex_case.rs:4:17: 4:26
let mut _0: (); // return place in scope 0 at $DIR/derefer_complex_case.rs:4:11: 4:11
let mut _1: std::slice::Iter<i32>; // in scope 0 at $DIR/derefer_complex_case.rs:5:17: 5:26
let mut _2: &[i32; 2]; // in scope 0 at $DIR/derefer_complex_case.rs:5:17: 5:26
let _3: [i32; 2]; // in scope 0 at $DIR/derefer_complex_case.rs:5:18: 5:26
let mut _4: std::slice::Iter<i32>; // in scope 0 at $DIR/derefer_complex_case.rs:5:17: 5:26
let mut _5: (); // in scope 0 at $DIR/derefer_complex_case.rs:4:1: 6:2
let _6: (); // in scope 0 at $DIR/derefer_complex_case.rs:5:17: 5:26
let mut _7: std::option::Option<&i32>; // in scope 0 at $DIR/derefer_complex_case.rs:5:17: 5:26
let mut _8: &mut std::slice::Iter<i32>; // in scope 0 at $DIR/derefer_complex_case.rs:5:17: 5:26
let mut _9: &mut std::slice::Iter<i32>; // in scope 0 at $DIR/derefer_complex_case.rs:5:17: 5:26
let mut _10: isize; // in scope 0 at $DIR/derefer_complex_case.rs:5:5: 5:40
let mut _11: !; // in scope 0 at $DIR/derefer_complex_case.rs:5:5: 5:40
let mut _13: i32; // in scope 0 at $DIR/derefer_complex_case.rs:5:34: 5:37
let mut _14: &[i32; 2]; // in scope 0 at $DIR/derefer_complex_case.rs:5:17: 5:26
+ let mut _15: &i32; // in scope 0 at $DIR/derefer_complex_case.rs:5:17: 5:26
scope 1 {
debug iter => _4; // in scope 1 at $DIR/derefer_complex_case.rs:4:17: 4:26
let _12: i32; // in scope 1 at $DIR/derefer_complex_case.rs:4:10: 4:13
debug iter => _4; // in scope 1 at $DIR/derefer_complex_case.rs:5:17: 5:26
let _12: i32; // in scope 1 at $DIR/derefer_complex_case.rs:5:10: 5:13
scope 2 {
debug foo => _12; // in scope 2 at $DIR/derefer_complex_case.rs:4:10: 4:13
debug foo => _12; // in scope 2 at $DIR/derefer_complex_case.rs:5:10: 5:13
}
}

bb0: {
StorageLive(_1); // scope 0 at $DIR/derefer_complex_case.rs:4:17: 4:26
StorageLive(_2); // scope 0 at $DIR/derefer_complex_case.rs:4:17: 4:26
_14 = const main::promoted[0]; // scope 0 at $DIR/derefer_complex_case.rs:4:17: 4:26
StorageLive(_1); // scope 0 at $DIR/derefer_complex_case.rs:5:17: 5:26
StorageLive(_2); // scope 0 at $DIR/derefer_complex_case.rs:5:17: 5:26
_14 = const main::promoted[0]; // scope 0 at $DIR/derefer_complex_case.rs:5:17: 5:26
// mir::Constant
// + span: $DIR/derefer_complex_case.rs:4:17: 4:26
// + span: $DIR/derefer_complex_case.rs:5:17: 5:26
// + literal: Const { ty: &[i32; 2], val: Unevaluated(main, [], Some(promoted[0])) }
_2 = &(*_14); // scope 0 at $DIR/derefer_complex_case.rs:4:17: 4:26
_1 = <&[i32; 2] as IntoIterator>::into_iter(move _2) -> bb1; // scope 0 at $DIR/derefer_complex_case.rs:4:17: 4:26
_2 = &(*_14); // scope 0 at $DIR/derefer_complex_case.rs:5:17: 5:26
_1 = <&[i32; 2] as IntoIterator>::into_iter(move _2) -> bb1; // scope 0 at $DIR/derefer_complex_case.rs:5:17: 5:26
// mir::Constant
// + span: $DIR/derefer_complex_case.rs:4:17: 4:26
// + span: $DIR/derefer_complex_case.rs:5:17: 5:26
// + literal: Const { ty: fn(&[i32; 2]) -> <&[i32; 2] as IntoIterator>::IntoIter {<&[i32; 2] as IntoIterator>::into_iter}, val: Value(<ZST>) }
}

bb1: {
StorageDead(_2); // scope 0 at $DIR/derefer_complex_case.rs:4:25: 4:26
StorageLive(_4); // scope 0 at $DIR/derefer_complex_case.rs:4:17: 4:26
_4 = move _1; // scope 0 at $DIR/derefer_complex_case.rs:4:17: 4:26
goto -> bb2; // scope 1 at $DIR/derefer_complex_case.rs:4:5: 4:40
StorageDead(_2); // scope 0 at $DIR/derefer_complex_case.rs:5:25: 5:26
StorageLive(_4); // scope 0 at $DIR/derefer_complex_case.rs:5:17: 5:26
_4 = move _1; // scope 0 at $DIR/derefer_complex_case.rs:5:17: 5:26
goto -> bb2; // scope 1 at $DIR/derefer_complex_case.rs:5:5: 5:40
}

bb2: {
StorageLive(_6); // scope 1 at $DIR/derefer_complex_case.rs:4:17: 4:26
StorageLive(_7); // scope 1 at $DIR/derefer_complex_case.rs:4:17: 4:26
StorageLive(_8); // scope 1 at $DIR/derefer_complex_case.rs:4:17: 4:26
StorageLive(_9); // scope 1 at $DIR/derefer_complex_case.rs:4:17: 4:26
_9 = &mut _4; // scope 1 at $DIR/derefer_complex_case.rs:4:17: 4:26
_8 = &mut (*_9); // scope 1 at $DIR/derefer_complex_case.rs:4:17: 4:26
_7 = <std::slice::Iter<i32> as Iterator>::next(move _8) -> bb3; // scope 1 at $DIR/derefer_complex_case.rs:4:17: 4:26
StorageLive(_6); // scope 1 at $DIR/derefer_complex_case.rs:5:17: 5:26
StorageLive(_7); // scope 1 at $DIR/derefer_complex_case.rs:5:17: 5:26
StorageLive(_8); // scope 1 at $DIR/derefer_complex_case.rs:5:17: 5:26
StorageLive(_9); // scope 1 at $DIR/derefer_complex_case.rs:5:17: 5:26
_9 = &mut _4; // scope 1 at $DIR/derefer_complex_case.rs:5:17: 5:26
_8 = &mut (*_9); // scope 1 at $DIR/derefer_complex_case.rs:5:17: 5:26
_7 = <std::slice::Iter<i32> as Iterator>::next(move _8) -> bb3; // scope 1 at $DIR/derefer_complex_case.rs:5:17: 5:26
// mir::Constant
// + span: $DIR/derefer_complex_case.rs:4:17: 4:26
// + span: $DIR/derefer_complex_case.rs:5:17: 5:26
// + literal: Const { ty: for<'r> fn(&'r mut std::slice::Iter<i32>) -> Option<<std::slice::Iter<i32> as Iterator>::Item> {<std::slice::Iter<i32> as Iterator>::next}, val: Value(<ZST>) }
}

bb3: {
StorageDead(_8); // scope 1 at $DIR/derefer_complex_case.rs:4:25: 4:26
_10 = discriminant(_7); // scope 1 at $DIR/derefer_complex_case.rs:4:17: 4:26
switchInt(move _10) -> [0_isize: bb6, 1_isize: bb4, otherwise: bb5]; // scope 1 at $DIR/derefer_complex_case.rs:4:17: 4:26
StorageDead(_8); // scope 1 at $DIR/derefer_complex_case.rs:5:25: 5:26
_10 = discriminant(_7); // scope 1 at $DIR/derefer_complex_case.rs:5:17: 5:26
switchInt(move _10) -> [0_isize: bb6, 1_isize: bb4, otherwise: bb5]; // scope 1 at $DIR/derefer_complex_case.rs:5:17: 5:26
}

bb4: {
StorageLive(_12); // scope 1 at $DIR/derefer_complex_case.rs:4:10: 4:13
- _12 = (*((_7 as Some).0: &i32)); // scope 1 at $DIR/derefer_complex_case.rs:4:10: 4:13
+ StorageLive(_15); // scope 1 at $DIR/derefer_complex_case.rs:4:10: 4:13
+ _15 = deref_copy ((_7 as Some).0: &i32); // scope 1 at $DIR/derefer_complex_case.rs:4:10: 4:13
+ _12 = (*_15); // scope 1 at $DIR/derefer_complex_case.rs:4:10: 4:13
+ StorageDead(_15); // scope 2 at $DIR/derefer_complex_case.rs:4:34: 4:37
StorageLive(_13); // scope 2 at $DIR/derefer_complex_case.rs:4:34: 4:37
_13 = _12; // scope 2 at $DIR/derefer_complex_case.rs:4:34: 4:37
_6 = std::mem::drop::<i32>(move _13) -> bb7; // scope 2 at $DIR/derefer_complex_case.rs:4:29: 4:38
StorageLive(_12); // scope 1 at $DIR/derefer_complex_case.rs:5:10: 5:13
- _12 = (*((_7 as Some).0: &i32)); // scope 1 at $DIR/derefer_complex_case.rs:5:10: 5:13
+ StorageLive(_15); // scope 1 at $DIR/derefer_complex_case.rs:5:10: 5:13
+ _15 = deref_copy ((_7 as Some).0: &i32); // scope 1 at $DIR/derefer_complex_case.rs:5:10: 5:13
+ _12 = (*_15); // scope 1 at $DIR/derefer_complex_case.rs:5:10: 5:13
+ StorageDead(_15); // scope 2 at $DIR/derefer_complex_case.rs:5:34: 5:37
StorageLive(_13); // scope 2 at $DIR/derefer_complex_case.rs:5:34: 5:37
_13 = _12; // scope 2 at $DIR/derefer_complex_case.rs:5:34: 5:37
_6 = std::mem::drop::<i32>(move _13) -> bb7; // scope 2 at $DIR/derefer_complex_case.rs:5:29: 5:38
// mir::Constant
// + span: $DIR/derefer_complex_case.rs:4:29: 4:33
// + span: $DIR/derefer_complex_case.rs:5:29: 5:33
// + literal: Const { ty: fn(i32) {std::mem::drop::<i32>}, val: Value(<ZST>) }
}

bb5: {
unreachable; // scope 1 at $DIR/derefer_complex_case.rs:4:17: 4:26
unreachable; // scope 1 at $DIR/derefer_complex_case.rs:5:17: 5:26
}

bb6: {
_0 = const (); // scope 1 at $DIR/derefer_complex_case.rs:4:5: 4:40
StorageDead(_9); // scope 1 at $DIR/derefer_complex_case.rs:4:39: 4:40
StorageDead(_7); // scope 1 at $DIR/derefer_complex_case.rs:4:39: 4:40
StorageDead(_6); // scope 1 at $DIR/derefer_complex_case.rs:4:39: 4:40
StorageDead(_4); // scope 0 at $DIR/derefer_complex_case.rs:4:39: 4:40
StorageDead(_1); // scope 0 at $DIR/derefer_complex_case.rs:4:39: 4:40
return; // scope 0 at $DIR/derefer_complex_case.rs:5:2: 5:2
_0 = const (); // scope 1 at $DIR/derefer_complex_case.rs:5:5: 5:40
StorageDead(_9); // scope 1 at $DIR/derefer_complex_case.rs:5:39: 5:40
StorageDead(_7); // scope 1 at $DIR/derefer_complex_case.rs:5:39: 5:40
StorageDead(_6); // scope 1 at $DIR/derefer_complex_case.rs:5:39: 5:40
StorageDead(_4); // scope 0 at $DIR/derefer_complex_case.rs:5:39: 5:40
StorageDead(_1); // scope 0 at $DIR/derefer_complex_case.rs:5:39: 5:40
return; // scope 0 at $DIR/derefer_complex_case.rs:6:2: 6:2
}

bb7: {
StorageDead(_13); // scope 2 at $DIR/derefer_complex_case.rs:4:37: 4:38
StorageDead(_12); // scope 1 at $DIR/derefer_complex_case.rs:4:39: 4:40
StorageDead(_9); // scope 1 at $DIR/derefer_complex_case.rs:4:39: 4:40
StorageDead(_7); // scope 1 at $DIR/derefer_complex_case.rs:4:39: 4:40
StorageDead(_6); // scope 1 at $DIR/derefer_complex_case.rs:4:39: 4:40
_5 = const (); // scope 1 at $DIR/derefer_complex_case.rs:4:5: 4:40
goto -> bb2; // scope 1 at $DIR/derefer_complex_case.rs:4:5: 4:40
StorageDead(_13); // scope 2 at $DIR/derefer_complex_case.rs:5:37: 5:38
StorageDead(_12); // scope 1 at $DIR/derefer_complex_case.rs:5:39: 5:40
StorageDead(_9); // scope 1 at $DIR/derefer_complex_case.rs:5:39: 5:40
StorageDead(_7); // scope 1 at $DIR/derefer_complex_case.rs:5:39: 5:40
StorageDead(_6); // scope 1 at $DIR/derefer_complex_case.rs:5:39: 5:40
_5 = const (); // scope 1 at $DIR/derefer_complex_case.rs:5:5: 5:40
goto -> bb2; // scope 1 at $DIR/derefer_complex_case.rs:5:5: 5:40
+ }
+
+ bb8 (cleanup): {
+ resume; // scope 0 at $DIR/derefer_complex_case.rs:3:1: 5:2
+ resume; // scope 0 at $DIR/derefer_complex_case.rs:4:1: 6:2
}
}

1 change: 1 addition & 0 deletions src/test/mir-opt/derefer_complex_case.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// EMIT_MIR derefer_complex_case.main.Derefer.diff
// ignore-wasm32

fn main() {
for &foo in &[42, 43] { drop(foo) }
Expand Down
Loading

0 comments on commit b4c3a2a

Please sign in to comment.