Skip to content

Commit

Permalink
Bless mir-opt tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas-schievink committed Sep 22, 2020
1 parent 4b6a482 commit 928a29f
Show file tree
Hide file tree
Showing 5 changed files with 188 additions and 178 deletions.
Expand Up @@ -24,10 +24,10 @@ fn main() -> () {
}

alloc0 (static: FOO, size: 4, align: 4) {
╾─alloc3──╼ │ ╾──╼
╾─alloc9──╼ │ ╾──╼
}

alloc3 (size: 168, align: 1) {
alloc9 (size: 168, align: 1) {
0x00 │ ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab │ ................
0x10 │ ab ab ab ab ab ab ab ab ab ab ab ab ╾─alloc4──╼ │ ............╾──╼
0x20 │ 01 ef cd ab 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
Expand Down
Expand Up @@ -24,10 +24,10 @@ fn main() -> () {
}

alloc0 (static: FOO, size: 8, align: 8) {
╾───────alloc3────────╼ │ ╾──────╼
╾───────alloc9────────╼ │ ╾──────╼
}

alloc3 (size: 180, align: 1) {
alloc9 (size: 180, align: 1) {
0x00 │ ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab │ ................
0x10 │ ab ab ab ab ab ab ab ab ab ab ab ab ╾──alloc4── │ ............╾───
0x20 │ ──────────╼ 01 ef cd ab 00 00 00 00 00 00 00 00 │ ───╼............
Expand Down
18 changes: 6 additions & 12 deletions src/test/mir-opt/dest-prop/simple.nrvo.DestinationPropagation.diff
Expand Up @@ -10,22 +10,18 @@
let mut _5: &mut [u8; 1024]; // in scope 0 at $DIR/simple.rs:6:10: 6:18
let mut _6: &mut [u8; 1024]; // in scope 0 at $DIR/simple.rs:6:10: 6:18
scope 1 {
- debug buf => _2; // in scope 1 at $DIR/simple.rs:5:9: 5:16
+ debug buf => _0; // in scope 1 at $DIR/simple.rs:5:9: 5:16
debug buf => _2; // in scope 1 at $DIR/simple.rs:5:9: 5:16
}

bb0: {
- StorageLive(_2); // scope 0 at $DIR/simple.rs:5:9: 5:16
- _2 = [const 0_u8; 1024]; // scope 0 at $DIR/simple.rs:5:19: 5:28
+ nop; // scope 0 at $DIR/simple.rs:5:9: 5:16
+ _0 = [const 0_u8; 1024]; // scope 0 at $DIR/simple.rs:5:19: 5:28
StorageLive(_2); // scope 0 at $DIR/simple.rs:5:9: 5:16
_2 = [const 0_u8; 1024]; // scope 0 at $DIR/simple.rs:5:19: 5:28
StorageLive(_3); // scope 1 at $DIR/simple.rs:6:5: 6:19
StorageLive(_4); // scope 1 at $DIR/simple.rs:6:5: 6:9
_4 = _1; // scope 1 at $DIR/simple.rs:6:5: 6:9
StorageLive(_5); // scope 1 at $DIR/simple.rs:6:10: 6:18
StorageLive(_6); // scope 1 at $DIR/simple.rs:6:10: 6:18
- _6 = &mut _2; // scope 1 at $DIR/simple.rs:6:10: 6:18
+ _6 = &mut _0; // scope 1 at $DIR/simple.rs:6:10: 6:18
_6 = &mut _2; // scope 1 at $DIR/simple.rs:6:10: 6:18
_5 = &mut (*_6); // scope 1 at $DIR/simple.rs:6:10: 6:18
_3 = move _4(move _5) -> bb1; // scope 1 at $DIR/simple.rs:6:5: 6:19
}
Expand All @@ -35,10 +31,8 @@
StorageDead(_4); // scope 1 at $DIR/simple.rs:6:18: 6:19
StorageDead(_6); // scope 1 at $DIR/simple.rs:6:19: 6:20
StorageDead(_3); // scope 1 at $DIR/simple.rs:6:19: 6:20
- _0 = _2; // scope 1 at $DIR/simple.rs:7:5: 7:8
- StorageDead(_2); // scope 0 at $DIR/simple.rs:8:1: 8:2
+ nop; // scope 1 at $DIR/simple.rs:7:5: 7:8
+ nop; // scope 0 at $DIR/simple.rs:8:1: 8:2
_0 = _2; // scope 1 at $DIR/simple.rs:7:5: 7:8
StorageDead(_2); // scope 0 at $DIR/simple.rs:8:1: 8:2
return; // scope 0 at $DIR/simple.rs:8:2: 8:2
}
}
Expand Down

0 comments on commit 928a29f

Please sign in to comment.