Bless tests

This commit is contained in:
dianqk 2025-03-24 16:55:24 +08:00
parent fefb0dba82
commit 1787789fe5
No known key found for this signature in database
21 changed files with 301 additions and 322 deletions

View file

@ -140,17 +140,19 @@ Number of file 0 mappings: 6
- Code(Counter(0)) at (prev + 2, 9) to (start + 0, 10) - Code(Counter(0)) at (prev + 2, 9) to (start + 0, 10)
Highest counter ID seen: c1 Highest counter ID seen: c1
Function name: closure::main::{closure#18} (unused) Function name: closure::main::{closure#18}
Raw bytes (24): 0x[01, 01, 00, 04, 00, 19, 0d, 02, 1c, 00, 02, 1d, 02, 12, 00, 02, 11, 00, 12, 00, 01, 11, 01, 0e] Raw bytes (26): 0x[01, 01, 01, 01, 05, 04, 01, 19, 0d, 02, 1c, 05, 02, 1d, 02, 12, 02, 02, 11, 00, 12, 01, 01, 11, 01, 0e]
Number of files: 1 Number of files: 1
- file 0 => global file 1 - file 0 => global file 1
Number of expressions: 0 Number of expressions: 1
- expression 0 operands: lhs = Counter(0), rhs = Counter(1)
Number of file 0 mappings: 4 Number of file 0 mappings: 4
- Code(Zero) at (prev + 25, 13) to (start + 2, 28) - Code(Counter(0)) at (prev + 25, 13) to (start + 2, 28)
- Code(Zero) at (prev + 2, 29) to (start + 2, 18) - Code(Counter(1)) at (prev + 2, 29) to (start + 2, 18)
- Code(Zero) at (prev + 2, 17) to (start + 0, 18) - Code(Expression(0, Sub)) at (prev + 2, 17) to (start + 0, 18)
- Code(Zero) at (prev + 1, 17) to (start + 1, 14) = (c0 - c1)
Highest counter ID seen: (none) - Code(Counter(0)) at (prev + 1, 17) to (start + 1, 14)
Highest counter ID seen: c1
Function name: closure::main::{closure#19} Function name: closure::main::{closure#19}
Raw bytes (26): 0x[01, 01, 01, 01, 05, 04, 01, 43, 0d, 02, 1c, 05, 02, 1d, 02, 12, 02, 02, 11, 00, 12, 01, 01, 11, 01, 0e] Raw bytes (26): 0x[01, 01, 01, 01, 05, 04, 01, 43, 0d, 02, 1c, 05, 02, 1d, 02, 12, 02, 02, 11, 00, 12, 01, 01, 11, 01, 0e]

View file

@ -59,109 +59,80 @@ Number of file 0 mappings: 1
Highest counter ID seen: c0 Highest counter ID seen: c0
Function name: issue_84561::test3 Function name: issue_84561::test3
Raw bytes (315): 0x[01, 01, 1b, 1d, 21, 25, 29, 21, 25, 2d, 31, 21, 17, 25, 2d, 41, 45, 49, 4d, 51, 55, 33, 51, 49, 4d, 33, 37, 49, 4d, 51, 59, 55, 59, 55, 59, 47, 5d, 55, 59, 61, 65, 71, 75, 69, 6d, 69, 6d, 69, 6d, 63, 79, 71, 75, 79, 7d, 7d, 81, 01, 33, 01, 08, 01, 03, 0f, 05, 04, 09, 01, 0f, 09, 02, 05, 04, 0f, 0d, 05, 05, 00, 0f, 11, 01, 05, 00, 0f, 15, 01, 09, 01, 0f, 19, 02, 05, 00, 0f, 1d, 01, 05, 00, 0f, 02, 00, 20, 00, 30, 21, 01, 05, 03, 0f, 25, 03, 20, 00, 30, 29, 00, 33, 00, 41, 06, 00, 4b, 00, 5a, 0a, 01, 05, 00, 0f, 2d, 05, 09, 03, 10, 31, 05, 0d, 00, 1b, 0e, 02, 0d, 00, 1c, 12, 04, 09, 02, 0f, 35, 06, 05, 00, 0f, 39, 04, 05, 00, 0f, 3d, 04, 09, 01, 0f, 41, 05, 08, 00, 0f, 45, 01, 09, 00, 13, 1a, 05, 09, 00, 13, 33, 05, 08, 00, 0f, 51, 01, 09, 00, 13, 22, 03, 0d, 00, 1d, 26, 03, 09, 00, 13, 2e, 03, 0d, 00, 1d, 47, 03, 05, 00, 0f, 47, 01, 0c, 00, 13, 5d, 01, 0d, 00, 13, 42, 02, 0d, 00, 13, 61, 04, 05, 02, 13, 65, 03, 0d, 00, 13, 4a, 02, 0d, 00, 13, 63, 03, 05, 00, 0f, 69, 01, 0c, 00, 13, 6d, 01, 0d, 00, 17, 71, 04, 0d, 00, 13, 5a, 02, 0d, 00, 17, 5a, 01, 14, 00, 1b, 00, 01, 15, 00, 1b, 5a, 02, 15, 00, 1b, 75, 04, 0d, 00, 13, 5e, 03, 09, 00, 19, 79, 02, 05, 00, 0f, 66, 03, 09, 00, 22, 7d, 02, 05, 00, 0f, 6a, 03, 09, 00, 2c, 81, 01, 02, 01, 00, 02] Raw bytes (279): 0x[01, 01, 0a, 0d, 11, 0d, 15, 0d, 19, 1d, 21, 29, 2d, 25, 29, 25, 29, 25, 29, 27, 31, 29, 2d, 33, 01, 08, 01, 03, 0f, 05, 04, 09, 01, 0f, 09, 02, 05, 04, 0f, 09, 05, 05, 00, 0f, 09, 01, 05, 00, 0f, 09, 01, 09, 01, 0f, 0d, 02, 05, 00, 0f, 0d, 01, 05, 00, 0f, 00, 00, 20, 00, 30, 0d, 01, 05, 03, 0f, 00, 03, 20, 00, 30, 00, 00, 33, 00, 41, 00, 00, 4b, 00, 5a, 0d, 01, 05, 00, 0f, 00, 05, 09, 03, 10, 00, 05, 0d, 00, 1b, 00, 02, 0d, 00, 1c, 0d, 04, 09, 02, 0f, 0d, 06, 05, 00, 0f, 0d, 04, 05, 00, 0f, 0d, 04, 09, 01, 0f, 0d, 05, 08, 00, 0f, 11, 01, 09, 00, 13, 02, 05, 09, 00, 13, 0d, 05, 08, 00, 0f, 15, 01, 09, 00, 13, 00, 03, 0d, 00, 1d, 06, 03, 09, 00, 13, 00, 03, 0d, 00, 1d, 0d, 03, 05, 00, 0f, 0d, 01, 0c, 00, 13, 19, 01, 0d, 00, 13, 0a, 02, 0d, 00, 13, 1d, 04, 05, 02, 13, 21, 03, 0d, 00, 13, 0e, 02, 0d, 00, 13, 27, 03, 05, 00, 0f, 25, 01, 0c, 00, 13, 29, 01, 0d, 00, 17, 29, 04, 0d, 00, 13, 1e, 02, 0d, 00, 17, 1e, 01, 14, 00, 1b, 00, 01, 15, 00, 1b, 1e, 02, 15, 00, 1b, 2d, 04, 0d, 00, 13, 22, 03, 09, 00, 19, 31, 02, 05, 00, 0f, 31, 03, 09, 00, 22, 00, 02, 05, 00, 0f, 00, 03, 09, 00, 2c, 00, 02, 01, 00, 02]
Number of files: 1 Number of files: 1
- file 0 => global file 1 - file 0 => global file 1
Number of expressions: 27 Number of expressions: 10
- expression 0 operands: lhs = Counter(7), rhs = Counter(8) - expression 0 operands: lhs = Counter(3), rhs = Counter(4)
- expression 1 operands: lhs = Counter(9), rhs = Counter(10) - expression 1 operands: lhs = Counter(3), rhs = Counter(5)
- expression 2 operands: lhs = Counter(8), rhs = Counter(9) - expression 2 operands: lhs = Counter(3), rhs = Counter(6)
- expression 3 operands: lhs = Counter(11), rhs = Counter(12) - expression 3 operands: lhs = Counter(7), rhs = Counter(8)
- expression 4 operands: lhs = Counter(8), rhs = Expression(5, Add) - expression 4 operands: lhs = Counter(10), rhs = Counter(11)
- expression 5 operands: lhs = Counter(9), rhs = Counter(11) - expression 5 operands: lhs = Counter(9), rhs = Counter(10)
- expression 6 operands: lhs = Counter(16), rhs = Counter(17) - expression 6 operands: lhs = Counter(9), rhs = Counter(10)
- expression 7 operands: lhs = Counter(18), rhs = Counter(19) - expression 7 operands: lhs = Counter(9), rhs = Counter(10)
- expression 8 operands: lhs = Counter(20), rhs = Counter(21) - expression 8 operands: lhs = Expression(9, Add), rhs = Counter(12)
- expression 9 operands: lhs = Expression(12, Add), rhs = Counter(20) - expression 9 operands: lhs = Counter(10), rhs = Counter(11)
- expression 10 operands: lhs = Counter(18), rhs = Counter(19)
- expression 11 operands: lhs = Expression(12, Add), rhs = Expression(13, Add)
- expression 12 operands: lhs = Counter(18), rhs = Counter(19)
- expression 13 operands: lhs = Counter(20), rhs = Counter(22)
- expression 14 operands: lhs = Counter(21), rhs = Counter(22)
- expression 15 operands: lhs = Counter(21), rhs = Counter(22)
- expression 16 operands: lhs = Expression(17, Add), rhs = Counter(23)
- expression 17 operands: lhs = Counter(21), rhs = Counter(22)
- expression 18 operands: lhs = Counter(24), rhs = Counter(25)
- expression 19 operands: lhs = Counter(28), rhs = Counter(29)
- expression 20 operands: lhs = Counter(26), rhs = Counter(27)
- expression 21 operands: lhs = Counter(26), rhs = Counter(27)
- expression 22 operands: lhs = Counter(26), rhs = Counter(27)
- expression 23 operands: lhs = Expression(24, Add), rhs = Counter(30)
- expression 24 operands: lhs = Counter(28), rhs = Counter(29)
- expression 25 operands: lhs = Counter(30), rhs = Counter(31)
- expression 26 operands: lhs = Counter(31), rhs = Counter(32)
Number of file 0 mappings: 51 Number of file 0 mappings: 51
- Code(Counter(0)) at (prev + 8, 1) to (start + 3, 15) - Code(Counter(0)) at (prev + 8, 1) to (start + 3, 15)
- Code(Counter(1)) at (prev + 4, 9) to (start + 1, 15) - Code(Counter(1)) at (prev + 4, 9) to (start + 1, 15)
- Code(Counter(2)) at (prev + 2, 5) to (start + 4, 15) - Code(Counter(2)) at (prev + 2, 5) to (start + 4, 15)
- Code(Counter(3)) at (prev + 5, 5) to (start + 0, 15) - Code(Counter(2)) at (prev + 5, 5) to (start + 0, 15)
- Code(Counter(4)) at (prev + 1, 5) to (start + 0, 15) - Code(Counter(2)) at (prev + 1, 5) to (start + 0, 15)
- Code(Counter(5)) at (prev + 1, 9) to (start + 1, 15) - Code(Counter(2)) at (prev + 1, 9) to (start + 1, 15)
- Code(Counter(6)) at (prev + 2, 5) to (start + 0, 15) - Code(Counter(3)) at (prev + 2, 5) to (start + 0, 15)
- Code(Counter(7)) at (prev + 1, 5) to (start + 0, 15) - Code(Counter(3)) at (prev + 1, 5) to (start + 0, 15)
- Code(Expression(0, Sub)) at (prev + 0, 32) to (start + 0, 48) - Code(Zero) at (prev + 0, 32) to (start + 0, 48)
- Code(Counter(3)) at (prev + 1, 5) to (start + 3, 15)
- Code(Zero) at (prev + 3, 32) to (start + 0, 48)
- Code(Zero) at (prev + 0, 51) to (start + 0, 65)
- Code(Zero) at (prev + 0, 75) to (start + 0, 90)
- Code(Counter(3)) at (prev + 1, 5) to (start + 0, 15)
- Code(Zero) at (prev + 5, 9) to (start + 3, 16)
- Code(Zero) at (prev + 5, 13) to (start + 0, 27)
- Code(Zero) at (prev + 2, 13) to (start + 0, 28)
- Code(Counter(3)) at (prev + 4, 9) to (start + 2, 15)
- Code(Counter(3)) at (prev + 6, 5) to (start + 0, 15)
- Code(Counter(3)) at (prev + 4, 5) to (start + 0, 15)
- Code(Counter(3)) at (prev + 4, 9) to (start + 1, 15)
- Code(Counter(3)) at (prev + 5, 8) to (start + 0, 15)
- Code(Counter(4)) at (prev + 1, 9) to (start + 0, 19)
- Code(Expression(0, Sub)) at (prev + 5, 9) to (start + 0, 19)
= (c3 - c4)
- Code(Counter(3)) at (prev + 5, 8) to (start + 0, 15)
- Code(Counter(5)) at (prev + 1, 9) to (start + 0, 19)
- Code(Zero) at (prev + 3, 13) to (start + 0, 29)
- Code(Expression(1, Sub)) at (prev + 3, 9) to (start + 0, 19)
= (c3 - c5)
- Code(Zero) at (prev + 3, 13) to (start + 0, 29)
- Code(Counter(3)) at (prev + 3, 5) to (start + 0, 15)
- Code(Counter(3)) at (prev + 1, 12) to (start + 0, 19)
- Code(Counter(6)) at (prev + 1, 13) to (start + 0, 19)
- Code(Expression(2, Sub)) at (prev + 2, 13) to (start + 0, 19)
= (c3 - c6)
- Code(Counter(7)) at (prev + 4, 5) to (start + 2, 19)
- Code(Counter(8)) at (prev + 3, 13) to (start + 0, 19)
- Code(Expression(3, Sub)) at (prev + 2, 13) to (start + 0, 19)
= (c7 - c8) = (c7 - c8)
- Code(Counter(8)) at (prev + 1, 5) to (start + 3, 15) - Code(Expression(9, Add)) at (prev + 3, 5) to (start + 0, 15)
- Code(Counter(9)) at (prev + 3, 32) to (start + 0, 48) = (c10 + c11)
- Code(Counter(10)) at (prev + 0, 51) to (start + 0, 65) - Code(Counter(9)) at (prev + 1, 12) to (start + 0, 19)
- Code(Expression(1, Sub)) at (prev + 0, 75) to (start + 0, 90) - Code(Counter(10)) at (prev + 1, 13) to (start + 0, 23)
- Code(Counter(10)) at (prev + 4, 13) to (start + 0, 19)
- Code(Expression(7, Sub)) at (prev + 2, 13) to (start + 0, 23)
= (c9 - c10)
- Code(Expression(7, Sub)) at (prev + 1, 20) to (start + 0, 27)
= (c9 - c10) = (c9 - c10)
- Code(Expression(2, Sub)) at (prev + 1, 5) to (start + 0, 15)
= (c8 - c9)
- Code(Counter(11)) at (prev + 5, 9) to (start + 3, 16)
- Code(Counter(12)) at (prev + 5, 13) to (start + 0, 27)
- Code(Expression(3, Sub)) at (prev + 2, 13) to (start + 0, 28)
= (c11 - c12)
- Code(Expression(4, Sub)) at (prev + 4, 9) to (start + 2, 15)
= (c8 - (c9 + c11))
- Code(Counter(13)) at (prev + 6, 5) to (start + 0, 15)
- Code(Counter(14)) at (prev + 4, 5) to (start + 0, 15)
- Code(Counter(15)) at (prev + 4, 9) to (start + 1, 15)
- Code(Counter(16)) at (prev + 5, 8) to (start + 0, 15)
- Code(Counter(17)) at (prev + 1, 9) to (start + 0, 19)
- Code(Expression(6, Sub)) at (prev + 5, 9) to (start + 0, 19)
= (c16 - c17)
- Code(Expression(12, Add)) at (prev + 5, 8) to (start + 0, 15)
= (c18 + c19)
- Code(Counter(20)) at (prev + 1, 9) to (start + 0, 19)
- Code(Expression(8, Sub)) at (prev + 3, 13) to (start + 0, 29)
= (c20 - c21)
- Code(Expression(9, Sub)) at (prev + 3, 9) to (start + 0, 19)
= ((c18 + c19) - c20)
- Code(Expression(11, Sub)) at (prev + 3, 13) to (start + 0, 29)
= ((c18 + c19) - (c20 + c22))
- Code(Expression(17, Add)) at (prev + 3, 5) to (start + 0, 15)
= (c21 + c22)
- Code(Expression(17, Add)) at (prev + 1, 12) to (start + 0, 19)
= (c21 + c22)
- Code(Counter(23)) at (prev + 1, 13) to (start + 0, 19)
- Code(Expression(16, Sub)) at (prev + 2, 13) to (start + 0, 19)
= ((c21 + c22) - c23)
- Code(Counter(24)) at (prev + 4, 5) to (start + 2, 19)
- Code(Counter(25)) at (prev + 3, 13) to (start + 0, 19)
- Code(Expression(18, Sub)) at (prev + 2, 13) to (start + 0, 19)
= (c24 - c25)
- Code(Expression(24, Add)) at (prev + 3, 5) to (start + 0, 15)
= (c28 + c29)
- Code(Counter(26)) at (prev + 1, 12) to (start + 0, 19)
- Code(Counter(27)) at (prev + 1, 13) to (start + 0, 23)
- Code(Counter(28)) at (prev + 4, 13) to (start + 0, 19)
- Code(Expression(22, Sub)) at (prev + 2, 13) to (start + 0, 23)
= (c26 - c27)
- Code(Expression(22, Sub)) at (prev + 1, 20) to (start + 0, 27)
= (c26 - c27)
- Code(Zero) at (prev + 1, 21) to (start + 0, 27) - Code(Zero) at (prev + 1, 21) to (start + 0, 27)
- Code(Expression(22, Sub)) at (prev + 2, 21) to (start + 0, 27) - Code(Expression(7, Sub)) at (prev + 2, 21) to (start + 0, 27)
= (c26 - c27) = (c9 - c10)
- Code(Counter(29)) at (prev + 4, 13) to (start + 0, 19) - Code(Counter(11)) at (prev + 4, 13) to (start + 0, 19)
- Code(Expression(23, Sub)) at (prev + 3, 9) to (start + 0, 25) - Code(Expression(8, Sub)) at (prev + 3, 9) to (start + 0, 25)
= ((c28 + c29) - c30) = ((c10 + c11) - c12)
- Code(Counter(30)) at (prev + 2, 5) to (start + 0, 15) - Code(Counter(12)) at (prev + 2, 5) to (start + 0, 15)
- Code(Expression(25, Sub)) at (prev + 3, 9) to (start + 0, 34) - Code(Counter(12)) at (prev + 3, 9) to (start + 0, 34)
= (c30 - c31) - Code(Zero) at (prev + 2, 5) to (start + 0, 15)
- Code(Counter(31)) at (prev + 2, 5) to (start + 0, 15) - Code(Zero) at (prev + 3, 9) to (start + 0, 44)
- Code(Expression(26, Sub)) at (prev + 3, 9) to (start + 0, 44) - Code(Zero) at (prev + 2, 1) to (start + 0, 2)
= (c31 - c32) Highest counter ID seen: c12
- Code(Counter(32)) at (prev + 2, 1) to (start + 0, 2)
Highest counter ID seen: c32

View file

@ -14,19 +14,23 @@
bb0: { bb0: {
StorageLive(_1); StorageLive(_1);
StorageLive(_2); - StorageLive(_2);
- StorageLive(_3); - StorageLive(_3);
+ nop;
+ nop; + nop;
_3 = const {ALLOC0: &u8}; _3 = const {ALLOC0: &u8};
_2 = copy (*_3); - _2 = copy (*_3);
+ _2 = const 2_u8;
StorageLive(_4); StorageLive(_4);
StorageLive(_5); StorageLive(_5);
_5 = const {ALLOC0: &u8}; _5 = const {ALLOC0: &u8};
- _4 = copy (*_5); - _4 = copy (*_5);
+ _4 = copy (*_3); - _1 = Add(move _2, move _4);
_1 = Add(move _2, move _4); + _4 = const 2_u8;
+ _1 = const 4_u8;
StorageDead(_4); StorageDead(_4);
StorageDead(_2); - StorageDead(_2);
+ nop;
StorageDead(_5); StorageDead(_5);
- StorageDead(_3); - StorageDead(_3);
+ nop; + nop;

View file

@ -6,6 +6,6 @@ static FOO: u8 = 2;
fn main() { fn main() {
// CHECK-LABEL: fn main( // CHECK-LABEL: fn main(
// CHECK: debug x => [[x:_.*]]; // CHECK: debug x => [[x:_.*]];
// CHECK-NOT: [[x]] = const 4_u8; // CHECK: [[x]] = const 4_u8;
let x = FOO + FOO; let x = FOO + FOO;
} }

View file

@ -16,7 +16,8 @@
StorageLive(_2); StorageLive(_2);
_4 = const main::promoted[0]; _4 = const main::promoted[0];
_2 = &(*_4); _2 = &(*_4);
_1 = copy (*_2); - _1 = copy (*_2);
+ _1 = const 4_i32;
StorageDead(_2); StorageDead(_2);
_0 = const (); _0 = const ();
StorageDead(_1); StorageDead(_1);

View file

@ -16,7 +16,8 @@
StorageLive(_2); StorageLive(_2);
_4 = const main::promoted[0]; _4 = const main::promoted[0];
_2 = &((*_4).1: i32); _2 = &((*_4).1: i32);
_1 = copy (*_2); - _1 = copy (*_2);
+ _1 = const 5_i32;
StorageDead(_2); StorageDead(_2);
_0 = const (); _0 = const ();
StorageDead(_1); StorageDead(_1);

View file

@ -5,6 +5,6 @@
fn main() { fn main() {
// CHECK-LABEL: fn main( // CHECK-LABEL: fn main(
// CHECK: debug a => [[a:_.*]]; // CHECK: debug a => [[a:_.*]];
// CHECK-NOT: [[a]] = const 5_i32; // CHECK: [[a]] = const 5_i32;
let a = *(&(4, 5).1); let a = *(&(4, 5).1);
} }

View file

@ -40,7 +40,7 @@
bb1: { bb1: {
- _1 = copy (*_2)[_6]; - _1 = copy (*_2)[_6];
+ _1 = copy (*_2)[1 of 2]; + _1 = const 2_u32;
StorageDead(_6); StorageDead(_6);
StorageDead(_4); StorageDead(_4);
StorageDead(_2); StorageDead(_2);

View file

@ -40,7 +40,7 @@
bb1: { bb1: {
- _1 = copy (*_2)[_6]; - _1 = copy (*_2)[_6];
+ _1 = copy (*_2)[1 of 2]; + _1 = const 2_u32;
StorageDead(_6); StorageDead(_6);
StorageDead(_4); StorageDead(_4);
StorageDead(_2); StorageDead(_2);

View file

@ -40,7 +40,7 @@
bb1: { bb1: {
- _1 = copy (*_2)[_6]; - _1 = copy (*_2)[_6];
+ _1 = copy (*_2)[1 of 2]; + _1 = const 2_u32;
StorageDead(_6); StorageDead(_6);
StorageDead(_4); StorageDead(_4);
StorageDead(_2); StorageDead(_2);

View file

@ -40,7 +40,7 @@
bb1: { bb1: {
- _1 = copy (*_2)[_6]; - _1 = copy (*_2)[_6];
+ _1 = copy (*_2)[1 of 2]; + _1 = const 2_u32;
StorageDead(_6); StorageDead(_6);
StorageDead(_4); StorageDead(_4);
StorageDead(_2); StorageDead(_2);

View file

@ -8,7 +8,7 @@ fn main() {
// CHECK-LABEL: fn main( // CHECK-LABEL: fn main(
// CHECK: debug a => [[a:_.*]]; // CHECK: debug a => [[a:_.*]];
// CHECK: [[slice:_.*]] = copy {{.*}} as &[u32] (PointerCoercion(Unsize, AsCast)); // CHECK: [[slice:_.*]] = copy {{.*}} as &[u32] (PointerCoercion(Unsize, AsCast));
// CHECK-NOT: assert(const true, // CHECK: assert(const true,
// CHECK-NOT: [[a]] = const 2_u32; // CHECK: [[a]] = const 2_u32;
let a = (&[1u32, 2, 3] as &[u32])[1]; let a = (&[1u32, 2, 3] as &[u32])[1];
} }

View file

@ -18,7 +18,8 @@
} }
bb2: { bb2: {
_0 = opaque::<T>(copy (*_3)) -> [return: bb3, unwind unreachable]; - _0 = opaque::<T>(copy (*_3)) -> [return: bb3, unwind unreachable];
+ _0 = opaque::<T>(copy _1) -> [return: bb3, unwind unreachable];
} }
bb3: { bb3: {

View file

@ -18,7 +18,8 @@
} }
bb2: { bb2: {
_0 = opaque::<T>(copy (*_3)) -> [return: bb3, unwind continue]; - _0 = opaque::<T>(copy (*_3)) -> [return: bb3, unwind continue];
+ _0 = opaque::<T>(copy _1) -> [return: bb3, unwind continue];
} }
bb3: { bb3: {

View file

@ -742,7 +742,7 @@ fn borrowed<T: Copy + Freeze>(x: T) {
// CHECK: bb1: { // CHECK: bb1: {
// CHECK-NEXT: _0 = opaque::<T>(copy _1) // CHECK-NEXT: _0 = opaque::<T>(copy _1)
// CHECK: bb2: { // CHECK: bb2: {
// CHECK-NEXT: _0 = opaque::<T>(copy (*_3)) // CHECK-NEXT: _0 = opaque::<T>(copy _1)
mir! { mir! {
{ {
let a = x; let a = x;

View file

@ -111,8 +111,9 @@
StorageLive(_7); StorageLive(_7);
StorageLive(_8); StorageLive(_8);
- StorageLive(_9); - StorageLive(_9);
- StorageLive(_10);
+ nop;
+ nop; + nop;
StorageLive(_10);
StorageLive(_11); StorageLive(_11);
_11 = &(*_1); _11 = &(*_1);
_10 = core::str::<impl str>::as_ptr(move _11) -> [return: bb3, unwind unreachable]; _10 = core::str::<impl str>::as_ptr(move _11) -> [return: bb3, unwind unreachable];
@ -122,8 +123,9 @@
StorageDead(_11); StorageDead(_11);
_9 = &_10; _9 = &_10;
- StorageLive(_12); - StorageLive(_12);
- StorageLive(_13);
+ nop;
+ nop; + nop;
StorageLive(_13);
StorageLive(_14); StorageLive(_14);
- _14 = &(*_4); - _14 = &(*_4);
+ _14 = &(*_1); + _14 = &(*_1);
@ -148,11 +150,12 @@
StorageLive(_17); StorageLive(_17);
StorageLive(_18); StorageLive(_18);
- _18 = copy (*_15); - _18 = copy (*_15);
+ _18 = copy (*_9); + _18 = copy _10;
StorageLive(_19); StorageLive(_19);
- _19 = copy (*_16); - _19 = copy (*_16);
+ _19 = copy (*_12); - _17 = Eq(move _18, move _19);
_17 = Eq(move _18, move _19); + _19 = copy _13;
+ _17 = Eq(copy _10, copy _13);
switchInt(move _17) -> [0: bb6, otherwise: bb5]; switchInt(move _17) -> [0: bb6, otherwise: bb5];
} }
@ -163,8 +166,10 @@
StorageDead(_17); StorageDead(_17);
StorageDead(_16); StorageDead(_16);
StorageDead(_15); StorageDead(_15);
StorageDead(_13); - StorageDead(_13);
StorageDead(_10); - StorageDead(_10);
+ nop;
+ nop;
StorageDead(_8); StorageDead(_8);
StorageDead(_7); StorageDead(_7);
- StorageLive(_29); - StorageLive(_29);
@ -213,8 +218,9 @@
StorageLive(_33); StorageLive(_33);
StorageLive(_34); StorageLive(_34);
- StorageLive(_35); - StorageLive(_35);
- StorageLive(_36);
+ nop;
+ nop; + nop;
StorageLive(_36);
StorageLive(_37); StorageLive(_37);
_37 = &(*_1); _37 = &(*_1);
_36 = core::str::<impl str>::as_ptr(move _37) -> [return: bb8, unwind unreachable]; _36 = core::str::<impl str>::as_ptr(move _37) -> [return: bb8, unwind unreachable];
@ -224,8 +230,9 @@
StorageDead(_37); StorageDead(_37);
_35 = &_36; _35 = &_36;
- StorageLive(_38); - StorageLive(_38);
- StorageLive(_39);
+ nop;
+ nop; + nop;
StorageLive(_39);
StorageLive(_40); StorageLive(_40);
_40 = &(*_29); _40 = &(*_29);
_39 = core::slice::<impl [u8]>::as_ptr(move _40) -> [return: bb9, unwind unreachable]; _39 = core::slice::<impl [u8]>::as_ptr(move _40) -> [return: bb9, unwind unreachable];
@ -249,11 +256,12 @@
StorageLive(_43); StorageLive(_43);
StorageLive(_44); StorageLive(_44);
- _44 = copy (*_41); - _44 = copy (*_41);
+ _44 = copy (*_35); + _44 = copy _36;
StorageLive(_45); StorageLive(_45);
- _45 = copy (*_42); - _45 = copy (*_42);
+ _45 = copy (*_38); - _43 = Eq(move _44, move _45);
_43 = Eq(move _44, move _45); + _45 = copy _39;
+ _43 = Eq(copy _36, copy _39);
switchInt(move _43) -> [0: bb11, otherwise: bb10]; switchInt(move _43) -> [0: bb11, otherwise: bb10];
} }
@ -264,8 +272,10 @@
StorageDead(_43); StorageDead(_43);
StorageDead(_42); StorageDead(_42);
StorageDead(_41); StorageDead(_41);
StorageDead(_39); - StorageDead(_39);
StorageDead(_36); - StorageDead(_36);
+ nop;
+ nop;
StorageDead(_34); StorageDead(_34);
StorageDead(_33); StorageDead(_33);
_0 = const (); _0 = const ();

View file

@ -111,8 +111,9 @@
StorageLive(_7); StorageLive(_7);
StorageLive(_8); StorageLive(_8);
- StorageLive(_9); - StorageLive(_9);
- StorageLive(_10);
+ nop;
+ nop; + nop;
StorageLive(_10);
StorageLive(_11); StorageLive(_11);
_11 = &(*_1); _11 = &(*_1);
_10 = core::str::<impl str>::as_ptr(move _11) -> [return: bb3, unwind continue]; _10 = core::str::<impl str>::as_ptr(move _11) -> [return: bb3, unwind continue];
@ -122,8 +123,9 @@
StorageDead(_11); StorageDead(_11);
_9 = &_10; _9 = &_10;
- StorageLive(_12); - StorageLive(_12);
- StorageLive(_13);
+ nop;
+ nop; + nop;
StorageLive(_13);
StorageLive(_14); StorageLive(_14);
- _14 = &(*_4); - _14 = &(*_4);
+ _14 = &(*_1); + _14 = &(*_1);
@ -148,11 +150,12 @@
StorageLive(_17); StorageLive(_17);
StorageLive(_18); StorageLive(_18);
- _18 = copy (*_15); - _18 = copy (*_15);
+ _18 = copy (*_9); + _18 = copy _10;
StorageLive(_19); StorageLive(_19);
- _19 = copy (*_16); - _19 = copy (*_16);
+ _19 = copy (*_12); - _17 = Eq(move _18, move _19);
_17 = Eq(move _18, move _19); + _19 = copy _13;
+ _17 = Eq(copy _10, copy _13);
switchInt(move _17) -> [0: bb6, otherwise: bb5]; switchInt(move _17) -> [0: bb6, otherwise: bb5];
} }
@ -163,8 +166,10 @@
StorageDead(_17); StorageDead(_17);
StorageDead(_16); StorageDead(_16);
StorageDead(_15); StorageDead(_15);
StorageDead(_13); - StorageDead(_13);
StorageDead(_10); - StorageDead(_10);
+ nop;
+ nop;
StorageDead(_8); StorageDead(_8);
StorageDead(_7); StorageDead(_7);
- StorageLive(_29); - StorageLive(_29);
@ -213,8 +218,9 @@
StorageLive(_33); StorageLive(_33);
StorageLive(_34); StorageLive(_34);
- StorageLive(_35); - StorageLive(_35);
- StorageLive(_36);
+ nop;
+ nop; + nop;
StorageLive(_36);
StorageLive(_37); StorageLive(_37);
_37 = &(*_1); _37 = &(*_1);
_36 = core::str::<impl str>::as_ptr(move _37) -> [return: bb8, unwind continue]; _36 = core::str::<impl str>::as_ptr(move _37) -> [return: bb8, unwind continue];
@ -224,8 +230,9 @@
StorageDead(_37); StorageDead(_37);
_35 = &_36; _35 = &_36;
- StorageLive(_38); - StorageLive(_38);
- StorageLive(_39);
+ nop;
+ nop; + nop;
StorageLive(_39);
StorageLive(_40); StorageLive(_40);
_40 = &(*_29); _40 = &(*_29);
_39 = core::slice::<impl [u8]>::as_ptr(move _40) -> [return: bb9, unwind continue]; _39 = core::slice::<impl [u8]>::as_ptr(move _40) -> [return: bb9, unwind continue];
@ -249,11 +256,12 @@
StorageLive(_43); StorageLive(_43);
StorageLive(_44); StorageLive(_44);
- _44 = copy (*_41); - _44 = copy (*_41);
+ _44 = copy (*_35); + _44 = copy _36;
StorageLive(_45); StorageLive(_45);
- _45 = copy (*_42); - _45 = copy (*_42);
+ _45 = copy (*_38); - _43 = Eq(move _44, move _45);
_43 = Eq(move _44, move _45); + _45 = copy _39;
+ _43 = Eq(copy _36, copy _39);
switchInt(move _43) -> [0: bb11, otherwise: bb10]; switchInt(move _43) -> [0: bb11, otherwise: bb10];
} }
@ -264,8 +272,10 @@
StorageDead(_43); StorageDead(_43);
StorageDead(_42); StorageDead(_42);
StorageDead(_41); StorageDead(_41);
StorageDead(_39); - StorageDead(_39);
StorageDead(_36); - StorageDead(_36);
+ nop;
+ nop;
StorageDead(_34); StorageDead(_34);
StorageDead(_33); StorageDead(_33);
_0 = const (); _0 = const ();

View file

@ -17,15 +17,16 @@
StorageLive(_3); StorageLive(_3);
_5 = const f::promoted[0]; _5 = const f::promoted[0];
_3 = &(*_5); _3 = &(*_5);
_2 = copy ((*_3).1: E); - _2 = copy ((*_3).1: E);
- StorageLive(_1); + _2 = const Scalar(0x00000000): E;
+ nop; StorageLive(_1);
_1 = copy ((_2 as A).1: u32); - _1 = copy ((_2 as A).1: u32);
+ _1 = const 0_u32;
StorageDead(_3); StorageDead(_3);
StorageDead(_2); StorageDead(_2);
_0 = copy _1; - _0 = copy _1;
- StorageDead(_1); + _0 = const 0_u32;
+ nop; StorageDead(_1);
return; return;
} }
} }

View file

@ -17,15 +17,16 @@
StorageLive(_3); StorageLive(_3);
_5 = const f::promoted[0]; _5 = const f::promoted[0];
_3 = &(*_5); _3 = &(*_5);
_2 = copy ((*_3).1: E); - _2 = copy ((*_3).1: E);
- StorageLive(_1); + _2 = const Scalar(0x00000000): E;
+ nop; StorageLive(_1);
_1 = copy ((_2 as A).1: u32); - _1 = copy ((_2 as A).1: u32);
+ _1 = const 0_u32;
StorageDead(_3); StorageDead(_3);
StorageDead(_2); StorageDead(_2);
_0 = copy _1; - _0 = copy _1;
- StorageDead(_1); + _0 = const 0_u32;
+ nop; StorageDead(_1);
return; return;
} }
} }

View file

@ -4,70 +4,65 @@ fn variant_a::{closure#0}(_1: &mut {closure@$DIR/slice_filter.rs:7:25: 7:39}, _2
let mut _0: bool; let mut _0: bool;
let mut _3: &(usize, usize, usize, usize); let mut _3: &(usize, usize, usize, usize);
let _4: &usize; let _4: &usize;
let mut _5: &(usize, usize, usize, usize); let _5: &usize;
let _6: &usize; let _6: &usize;
let mut _7: &(usize, usize, usize, usize); let _7: &usize;
let _8: &usize; let mut _8: &&usize;
let mut _9: &(usize, usize, usize, usize); let _9: &usize;
let _10: &usize; let mut _10: &&usize;
let mut _11: &&usize; let mut _13: bool;
let _12: &usize; let mut _14: &&usize;
let mut _13: &&usize; let _15: &usize;
let mut _16: bool; let mut _16: &&usize;
let mut _17: &&usize; let mut _19: bool;
let _18: &usize; let mut _20: &&usize;
let mut _19: &&usize; let _21: &usize;
let mut _22: bool; let mut _22: &&usize;
let mut _23: &&usize; let mut _23: bool;
let _24: &usize; let mut _24: &&usize;
let mut _25: &&usize; let _25: &usize;
let mut _28: bool; let mut _26: &&usize;
let mut _29: &&usize;
let _30: &usize;
let mut _31: &&usize;
scope 1 { scope 1 {
debug a => _4; debug a => _4;
debug b => _6; debug b => _5;
debug c => _8; debug c => _6;
debug d => _10; debug d => _7;
scope 2 (inlined std::cmp::impls::<impl PartialOrd for &usize>::le) { scope 2 (inlined std::cmp::impls::<impl PartialOrd for &usize>::le) {
debug self => _11; debug self => _8;
debug other => _13; debug other => _10;
scope 3 (inlined std::cmp::impls::<impl PartialOrd for usize>::le) { scope 3 (inlined std::cmp::impls::<impl PartialOrd for usize>::le) {
debug self => _4; debug self => _4;
debug other => _8; debug other => _6;
let mut _14: usize; let mut _11: usize;
let mut _15: usize; let mut _12: usize;
} }
} }
scope 4 (inlined std::cmp::impls::<impl PartialOrd for &usize>::le) { scope 4 (inlined std::cmp::impls::<impl PartialOrd for &usize>::le) {
debug self => _17; debug self => _14;
debug other => _19; debug other => _16;
scope 5 (inlined std::cmp::impls::<impl PartialOrd for usize>::le) { scope 5 (inlined std::cmp::impls::<impl PartialOrd for usize>::le) {
debug self => _10; debug self => _7;
debug other => _6; debug other => _5;
let mut _20: usize; let mut _17: usize;
let mut _21: usize; let mut _18: usize;
} }
} }
scope 6 (inlined std::cmp::impls::<impl PartialOrd for &usize>::le) { scope 6 (inlined std::cmp::impls::<impl PartialOrd for &usize>::le) {
debug self => _23; debug self => _20;
debug other => _25; debug other => _22;
scope 7 (inlined std::cmp::impls::<impl PartialOrd for usize>::le) { scope 7 (inlined std::cmp::impls::<impl PartialOrd for usize>::le) {
debug self => _8; debug self => _6;
debug other => _4; debug other => _4;
let mut _26: usize;
let mut _27: usize;
} }
} }
scope 8 (inlined std::cmp::impls::<impl PartialOrd for &usize>::le) { scope 8 (inlined std::cmp::impls::<impl PartialOrd for &usize>::le) {
debug self => _29; debug self => _24;
debug other => _31; debug other => _26;
scope 9 (inlined std::cmp::impls::<impl PartialOrd for usize>::le) { scope 9 (inlined std::cmp::impls::<impl PartialOrd for usize>::le) {
debug self => _6; debug self => _5;
debug other => _10; debug other => _7;
let mut _32: usize; let mut _27: usize;
let mut _33: usize; let mut _28: usize;
} }
} }
} }
@ -75,129 +70,116 @@ fn variant_a::{closure#0}(_1: &mut {closure@$DIR/slice_filter.rs:7:25: 7:39}, _2
bb0: { bb0: {
_3 = copy (*_2); _3 = copy (*_2);
_4 = &((*_3).0: usize); _4 = &((*_3).0: usize);
_5 = copy (*_2); _5 = &((*_3).1: usize);
_6 = &((*_5).1: usize); _6 = &((*_3).2: usize);
_7 = copy (*_2); _7 = &((*_3).3: usize);
_8 = &((*_7).2: usize);
_9 = copy (*_2);
_10 = &((*_9).3: usize);
StorageLive(_16);
StorageLive(_11);
_11 = &_4;
StorageLive(_13); StorageLive(_13);
StorageLive(_12); StorageLive(_8);
_12 = copy _8; _8 = &_4;
_13 = &_12; StorageLive(_10);
StorageLive(_14); StorageLive(_9);
_14 = copy ((*_3).0: usize); _9 = copy _6;
StorageLive(_15); _10 = &_9;
_15 = copy ((*_7).2: usize); _11 = copy ((*_3).0: usize);
_16 = Le(move _14, move _15); _12 = copy ((*_3).2: usize);
StorageDead(_15); _13 = Le(copy _11, copy _12);
StorageDead(_14); switchInt(move _13) -> [0: bb1, otherwise: bb2];
switchInt(move _16) -> [0: bb1, otherwise: bb2];
} }
bb1: { bb1: {
StorageDead(_12); StorageDead(_9);
StorageDead(_13); StorageDead(_10);
StorageDead(_11); StorageDead(_8);
goto -> bb4; goto -> bb4;
} }
bb2: { bb2: {
StorageDead(_12); StorageDead(_9);
StorageDead(_13); StorageDead(_10);
StorageDead(_11); StorageDead(_8);
StorageLive(_22);
StorageLive(_17);
_17 = &_10;
StorageLive(_19); StorageLive(_19);
StorageLive(_14);
_14 = &_7;
StorageLive(_16);
StorageLive(_15);
_15 = copy _5;
_16 = &_15;
StorageLive(_17);
_17 = copy ((*_3).3: usize);
StorageLive(_18); StorageLive(_18);
_18 = copy _6; _18 = copy ((*_3).1: usize);
_19 = &_18; _19 = Le(move _17, move _18);
StorageLive(_20); StorageDead(_18);
_20 = copy ((*_9).3: usize); StorageDead(_17);
StorageLive(_21); switchInt(move _19) -> [0: bb3, otherwise: bb8];
_21 = copy ((*_5).1: usize);
_22 = Le(move _20, move _21);
StorageDead(_21);
StorageDead(_20);
switchInt(move _22) -> [0: bb3, otherwise: bb8];
} }
bb3: { bb3: {
StorageDead(_18); StorageDead(_15);
StorageDead(_19); StorageDead(_16);
StorageDead(_17); StorageDead(_14);
goto -> bb4; goto -> bb4;
} }
bb4: { bb4: {
StorageLive(_28);
StorageLive(_23); StorageLive(_23);
_23 = &_8; StorageLive(_20);
StorageLive(_25); _20 = &_6;
StorageLive(_24); StorageLive(_22);
_24 = copy _4; StorageLive(_21);
_25 = &_24; _21 = copy _4;
StorageLive(_26); _22 = &_21;
_26 = copy ((*_7).2: usize); _23 = Le(copy _12, copy _11);
StorageLive(_27); switchInt(move _23) -> [0: bb5, otherwise: bb6];
_27 = copy ((*_3).0: usize);
_28 = Le(move _26, move _27);
StorageDead(_27);
StorageDead(_26);
switchInt(move _28) -> [0: bb5, otherwise: bb6];
} }
bb5: { bb5: {
StorageDead(_24); StorageDead(_21);
StorageDead(_25); StorageDead(_22);
StorageDead(_23); StorageDead(_20);
_0 = const false; _0 = const false;
goto -> bb7; goto -> bb7;
} }
bb6: { bb6: {
StorageDead(_24); StorageDead(_21);
StorageDead(_22);
StorageDead(_20);
StorageLive(_24);
_24 = &_5;
StorageLive(_26);
StorageLive(_25);
_25 = copy _7;
_26 = &_25;
StorageLive(_27);
_27 = copy ((*_3).1: usize);
StorageLive(_28);
_28 = copy ((*_3).3: usize);
_0 = Le(move _27, move _28);
StorageDead(_28);
StorageDead(_27);
StorageDead(_25); StorageDead(_25);
StorageDead(_23); StorageDead(_26);
StorageLive(_29); StorageDead(_24);
_29 = &_6;
StorageLive(_31);
StorageLive(_30);
_30 = copy _10;
_31 = &_30;
StorageLive(_32);
_32 = copy ((*_5).1: usize);
StorageLive(_33);
_33 = copy ((*_9).3: usize);
_0 = Le(move _32, move _33);
StorageDead(_33);
StorageDead(_32);
StorageDead(_30);
StorageDead(_31);
StorageDead(_29);
goto -> bb7; goto -> bb7;
} }
bb7: { bb7: {
StorageDead(_28); StorageDead(_23);
goto -> bb9; goto -> bb9;
} }
bb8: { bb8: {
StorageDead(_18); StorageDead(_15);
StorageDead(_19); StorageDead(_16);
StorageDead(_17); StorageDead(_14);
_0 = const true; _0 = const true;
goto -> bb9; goto -> bb9;
} }
bb9: { bb9: {
StorageDead(_22); StorageDead(_19);
StorageDead(_16); StorageDead(_13);
return; return;
} }
} }

View file

@ -4,46 +4,40 @@ fn variant_b::{closure#0}(_1: &mut {closure@$DIR/slice_filter.rs:11:25: 11:41},
let mut _0: bool; let mut _0: bool;
let mut _3: &(usize, usize, usize, usize); let mut _3: &(usize, usize, usize, usize);
let _4: usize; let _4: usize;
let mut _5: &(usize, usize, usize, usize); let _5: usize;
let _6: usize; let _6: usize;
let mut _7: &(usize, usize, usize, usize); let _7: usize;
let _8: usize; let mut _8: bool;
let mut _9: &(usize, usize, usize, usize); let mut _9: bool;
let _10: usize; let mut _10: bool;
let mut _11: bool;
let mut _12: bool;
let mut _13: bool;
scope 1 { scope 1 {
debug a => _4; debug a => _4;
debug b => _6; debug b => _5;
debug c => _8; debug c => _6;
debug d => _10; debug d => _7;
} }
bb0: { bb0: {
_3 = copy (*_2); _3 = copy (*_2);
_4 = copy ((*_3).0: usize); _4 = copy ((*_3).0: usize);
_5 = copy (*_2); _5 = copy ((*_3).1: usize);
_6 = copy ((*_5).1: usize); _6 = copy ((*_3).2: usize);
_7 = copy (*_2); _7 = copy ((*_3).3: usize);
_8 = copy ((*_7).2: usize); StorageLive(_8);
_9 = copy (*_2); _8 = Le(copy _4, copy _6);
_10 = copy ((*_9).3: usize); switchInt(move _8) -> [0: bb2, otherwise: bb1];
StorageLive(_11);
_11 = Le(copy _4, copy _8);
switchInt(move _11) -> [0: bb2, otherwise: bb1];
} }
bb1: { bb1: {
StorageLive(_12); StorageLive(_9);
_12 = Le(copy _10, copy _6); _9 = Le(copy _7, copy _5);
switchInt(move _12) -> [0: bb2, otherwise: bb6]; switchInt(move _9) -> [0: bb2, otherwise: bb6];
} }
bb2: { bb2: {
StorageLive(_13); StorageLive(_10);
_13 = Le(copy _8, copy _4); _10 = Le(copy _6, copy _4);
switchInt(move _13) -> [0: bb3, otherwise: bb4]; switchInt(move _10) -> [0: bb3, otherwise: bb4];
} }
bb3: { bb3: {
@ -52,12 +46,12 @@ fn variant_b::{closure#0}(_1: &mut {closure@$DIR/slice_filter.rs:11:25: 11:41},
} }
bb4: { bb4: {
_0 = Le(copy _6, copy _10); _0 = Le(copy _5, copy _7);
goto -> bb5; goto -> bb5;
} }
bb5: { bb5: {
StorageDead(_13); StorageDead(_10);
goto -> bb7; goto -> bb7;
} }
@ -67,8 +61,8 @@ fn variant_b::{closure#0}(_1: &mut {closure@$DIR/slice_filter.rs:11:25: 11:41},
} }
bb7: { bb7: {
StorageDead(_12); StorageDead(_9);
StorageDead(_11); StorageDead(_8);
return; return;
} }
} }