Skip to content

Commit

Permalink
Update tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
m-ou-se committed Feb 19, 2025
1 parent 25ccdae commit bb53ca3
Show file tree
Hide file tree
Showing 8 changed files with 122 additions and 106 deletions.
20 changes: 8 additions & 12 deletions tests/coverage/closure.cov-map
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,14 @@ Number of file 0 mappings: 3
Highest counter ID seen: c1

Function name: closure::main::{closure#15}
Raw bytes (37): 0x[01, 01, 01, 01, 05, 06, 01, bb, 01, 09, 00, 0a, 01, 01, 0d, 00, 15, 01, 01, 11, 01, 1b, 05, 01, 1e, 00, 25, 02, 00, 2f, 00, 33, 01, 02, 09, 00, 0a]
Raw bytes (27): 0x[01, 01, 01, 01, 05, 04, 01, bb, 01, 09, 03, 1b, 05, 03, 1e, 00, 25, 02, 00, 2f, 00, 33, 01, 02, 09, 00, 0a]
Number of files: 1
- file 0 => global file 1
Number of expressions: 1
- expression 0 operands: lhs = Counter(0), rhs = Counter(1)
Number of file 0 mappings: 6
- Code(Counter(0)) at (prev + 187, 9) to (start + 0, 10)
- Code(Counter(0)) at (prev + 1, 13) to (start + 0, 21)
- Code(Counter(0)) at (prev + 1, 17) to (start + 1, 27)
- Code(Counter(1)) at (prev + 1, 30) to (start + 0, 37)
Number of file 0 mappings: 4
- Code(Counter(0)) at (prev + 187, 9) to (start + 3, 27)
- Code(Counter(1)) at (prev + 3, 30) to (start + 0, 37)
- Code(Expression(0, Sub)) at (prev + 0, 47) to (start + 0, 51)
= (c0 - c1)
- Code(Counter(0)) at (prev + 2, 9) to (start + 0, 10)
Expand All @@ -125,16 +123,14 @@ Number of file 0 mappings: 3
Highest counter ID seen: c1

Function name: closure::main::{closure#17}
Raw bytes (37): 0x[01, 01, 01, 01, 05, 06, 01, cd, 01, 09, 00, 0a, 01, 01, 0d, 00, 15, 01, 01, 11, 01, 1b, 05, 01, 1e, 00, 25, 02, 00, 2f, 00, 33, 01, 02, 09, 00, 0a]
Raw bytes (27): 0x[01, 01, 01, 01, 05, 04, 01, cd, 01, 09, 03, 1b, 05, 03, 1e, 00, 25, 02, 00, 2f, 00, 33, 01, 02, 09, 00, 0a]
Number of files: 1
- file 0 => global file 1
Number of expressions: 1
- expression 0 operands: lhs = Counter(0), rhs = Counter(1)
Number of file 0 mappings: 6
- Code(Counter(0)) at (prev + 205, 9) to (start + 0, 10)
- Code(Counter(0)) at (prev + 1, 13) to (start + 0, 21)
- Code(Counter(0)) at (prev + 1, 17) to (start + 1, 27)
- Code(Counter(1)) at (prev + 1, 30) to (start + 0, 37)
Number of file 0 mappings: 4
- Code(Counter(0)) at (prev + 205, 9) to (start + 3, 27)
- Code(Counter(1)) at (prev + 3, 30) to (start + 0, 37)
- Code(Expression(0, Sub)) at (prev + 0, 47) to (start + 0, 51)
= (c0 - c1)
- Code(Counter(0)) at (prev + 2, 9) to (start + 0, 10)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
StorageLive(_20);
StorageLive(_21);
_21 = copy (((*_1).0: std::fmt::FormattingOptions).0: u32);
_20 = BitAnd(move _21, const core::fmt::flags::SIGN_PLUS_FLAG);
_20 = BitAnd(move _21, const core::fmt::rt::SIGN_PLUS_FLAG);
StorageDead(_21);
_4 = Ne(move _20, const 0_u32);
StorageDead(_20);
Expand All @@ -72,7 +72,7 @@
StorageLive(_22);
StorageLive(_23);
_23 = copy (((*_1).0: std::fmt::FormattingOptions).0: u32);
_22 = BitAnd(move _23, const core::fmt::flags::PRECISION_FLAG);
_22 = BitAnd(move _23, const core::fmt::rt::PRECISION_FLAG);
StorageDead(_23);
switchInt(move _22) -> [0: bb10, otherwise: bb11];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
StorageLive(_20);
StorageLive(_21);
_21 = copy (((*_1).0: std::fmt::FormattingOptions).0: u32);
_20 = BitAnd(move _21, const core::fmt::flags::SIGN_PLUS_FLAG);
_20 = BitAnd(move _21, const core::fmt::rt::SIGN_PLUS_FLAG);
StorageDead(_21);
_4 = Ne(move _20, const 0_u32);
StorageDead(_20);
Expand All @@ -72,7 +72,7 @@
StorageLive(_22);
StorageLive(_23);
_23 = copy (((*_1).0: std::fmt::FormattingOptions).0: u32);
_22 = BitAnd(move _23, const core::fmt::flags::PRECISION_FLAG);
_22 = BitAnd(move _23, const core::fmt::rt::PRECISION_FLAG);
StorageDead(_23);
switchInt(move _22) -> [0: bb10, otherwise: bb11];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
StorageLive(_20);
StorageLive(_21);
_21 = copy (((*_1).0: std::fmt::FormattingOptions).0: u32);
_20 = BitAnd(move _21, const core::fmt::flags::SIGN_PLUS_FLAG);
_20 = BitAnd(move _21, const core::fmt::rt::SIGN_PLUS_FLAG);
StorageDead(_21);
_4 = Ne(move _20, const 0_u32);
StorageDead(_20);
Expand All @@ -72,7 +72,7 @@
StorageLive(_22);
StorageLive(_23);
_23 = copy (((*_1).0: std::fmt::FormattingOptions).0: u32);
_22 = BitAnd(move _23, const core::fmt::flags::PRECISION_FLAG);
_22 = BitAnd(move _23, const core::fmt::rt::PRECISION_FLAG);
StorageDead(_23);
switchInt(move _22) -> [0: bb10, otherwise: bb11];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
StorageLive(_20);
StorageLive(_21);
_21 = copy (((*_1).0: std::fmt::FormattingOptions).0: u32);
_20 = BitAnd(move _21, const core::fmt::flags::SIGN_PLUS_FLAG);
_20 = BitAnd(move _21, const core::fmt::rt::SIGN_PLUS_FLAG);
StorageDead(_21);
_4 = Ne(move _20, const 0_u32);
StorageDead(_20);
Expand All @@ -72,7 +72,7 @@
StorageLive(_22);
StorageLive(_23);
_23 = copy (((*_1).0: std::fmt::FormattingOptions).0: u32);
_22 = BitAnd(move _23, const core::fmt::flags::PRECISION_FLAG);
_22 = BitAnd(move _23, const core::fmt::rt::PRECISION_FLAG);
StorageDead(_23);
switchInt(move _22) -> [0: bb10, otherwise: bb11];
}
Expand Down
12 changes: 8 additions & 4 deletions tests/mir-opt/gvn.slices.GVN.panic-unwind.diff
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,10 @@
+ _27 = &(*_12);
_26 = &(*_27);
StorageLive(_28);
_28 = Option::<Arguments<'_>>::None;
- _28 = Option::<Arguments<'_>>::None;
- _22 = assert_failed::<*const u8, *const u8>(move _23, move _24, move _26, move _28) -> unwind continue;
+ _22 = assert_failed::<*const u8, *const u8>(const core::panicking::AssertKind::Eq, move _24, move _26, move _28) -> unwind continue;
+ _28 = const Option::<Arguments<'_>>::None;
+ _22 = assert_failed::<*const u8, *const u8>(const core::panicking::AssertKind::Eq, move _24, move _26, const Option::<Arguments<'_>>::None) -> unwind continue;
}

bb7: {
Expand Down Expand Up @@ -299,9 +300,12 @@
+ _53 = &(*_38);
_52 = &(*_53);
StorageLive(_54);
_54 = Option::<Arguments<'_>>::None;
- _54 = Option::<Arguments<'_>>::None;
- _48 = assert_failed::<*const u8, *const u8>(move _49, move _50, move _52, move _54) -> unwind continue;
+ _48 = assert_failed::<*const u8, *const u8>(const core::panicking::AssertKind::Eq, move _50, move _52, move _54) -> unwind continue;
+ _54 = const Option::<Arguments<'_>>::None;
+ _48 = assert_failed::<*const u8, *const u8>(const core::panicking::AssertKind::Eq, move _50, move _52, const Option::<Arguments<'_>>::None) -> unwind continue;
}
}
+
+ ALLOC0 (size: 16, align: 8) { .. }

Loading

0 comments on commit bb53ca3

Please sign in to comment.