FileCheck issue_66971. · rust-lang/rust@ce9b1e2 (original) (raw)
3 files changed
lines changed
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -5,17 +5,24 @@ | ||
5 | 5 | let mut _0: (); |
6 | 6 | let _1: (); |
7 | 7 | let mut _2: ((), u8, u8); |
8 | + let mut _3: (); | |
8 | 9 | |
9 | 10 | bb0: { |
11 | + StorageLive(_1); | |
10 | 12 | StorageLive(_2); |
11 | -- _2 = (const (), const 0_u8, const 0_u8); | |
12 | -- _1 = encode(move _2) -> [return: bb1, unwind unreachable]; | |
13 | + StorageLive(_3); | |
14 | + _3 = (); | |
15 | +- _2 = (move _3, const 0_u8, const 0_u8); | |
13 | 16 | + _2 = const ((), 0_u8, 0_u8); |
17 | + StorageDead(_3); | |
18 | +- _1 = encode(move _2) -> [return: bb1, unwind unreachable]; | |
14 | 19 | + _1 = encode(const ((), 0_u8, 0_u8)) -> [return: bb1, unwind unreachable]; |
15 | 20 | } |
16 | 21 | |
17 | 22 | bb1: { |
18 | 23 | StorageDead(_2); |
24 | + StorageDead(_1); | |
25 | + _0 = const (); | |
19 | 26 | return; |
20 | 27 | } |
21 | 28 | + } |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -5,17 +5,24 @@ | ||
5 | 5 | let mut _0: (); |
6 | 6 | let _1: (); |
7 | 7 | let mut _2: ((), u8, u8); |
8 | + let mut _3: (); | |
8 | 9 | |
9 | 10 | bb0: { |
11 | + StorageLive(_1); | |
10 | 12 | StorageLive(_2); |
11 | -- _2 = (const (), const 0_u8, const 0_u8); | |
12 | -- _1 = encode(move _2) -> [return: bb1, unwind continue]; | |
13 | + StorageLive(_3); | |
14 | + _3 = (); | |
15 | +- _2 = (move _3, const 0_u8, const 0_u8); | |
13 | 16 | + _2 = const ((), 0_u8, 0_u8); |
17 | + StorageDead(_3); | |
18 | +- _1 = encode(move _2) -> [return: bb1, unwind continue]; | |
14 | 19 | + _1 = encode(const ((), 0_u8, 0_u8)) -> [return: bb1, unwind continue]; |
15 | 20 | } |
16 | 21 | |
17 | 22 | bb1: { |
18 | 23 | StorageDead(_2); |
24 | + StorageDead(_1); | |
25 | + _0 = const (); | |
19 | 26 | return; |
20 | 27 | } |
21 | 28 | + } |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
1 | -// skip-filecheck | |
2 | 1 | // EMIT_MIR_FOR_EACH_PANIC_STRATEGY |
3 | 2 | // unit-test: ConstProp |
4 | -// compile-flags: -Z mir-opt-level=3 | |
5 | 3 | |
6 | 4 | // Due to a bug in propagating scalar pairs the assertion below used to fail. In the expected |
7 | 5 | // outputs below, after ConstProp this is how _2 would look like with the bug: |
@@ -16,5 +14,7 @@ fn encode(this: ((), u8, u8)) { | ||
16 | 14 | |
17 | 15 | // EMIT_MIR issue_66971.main.ConstProp.diff |
18 | 16 | fn main() { |
17 | +// CHECK-LABEL: fn main( | |
18 | +// CHECK: = encode(const ((), 0_u8, 0_u8)) | |
19 | 19 | encode(((), 0, 0)); |
20 | 20 | } |