Skip to content

Commit 5c9b371

Browse files
committed
Bless tests
1 parent 229b0a0 commit 5c9b371

7 files changed

+11
-10
lines changed

tests/mir-opt/lower_intrinsics.assume.LowerIntrinsics.diff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
StorageLive(_1); // scope 1 at $DIR/lower_intrinsics.rs:+2:9: +2:38
1212
- _1 = std::intrinsics::assume(const true) -> [return: bb1, unwind unreachable]; // scope 1 at $DIR/lower_intrinsics.rs:+2:9: +2:38
1313
- // mir::Constant
14-
- // + span: $DIR/lower_intrinsics.rs:105:9: 105:32
14+
- // + span: $DIR/lower_intrinsics.rs:106:9: 106:32
1515
- // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(bool) {std::intrinsics::assume}, val: Value(<ZST>) }
1616
+ assume(const true); // scope 1 at $DIR/lower_intrinsics.rs:+2:9: +2:38
1717
+ goto -> bb1; // scope 1 at $DIR/lower_intrinsics.rs:+2:9: +2:38

tests/mir-opt/lower_intrinsics.f_copy_nonoverlapping.LowerIntrinsics.diff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
StorageDead(_9); // scope 3 at $DIR/lower_intrinsics.rs:+4:90: +4:91
5050
- _3 = copy_nonoverlapping::<i32>(move _4, move _8, const 0_usize) -> [return: bb1, unwind unreachable]; // scope 3 at $DIR/lower_intrinsics.rs:+4:9: +4:95
5151
- // mir::Constant
52-
- // + span: $DIR/lower_intrinsics.rs:98:9: 98:28
52+
- // + span: $DIR/lower_intrinsics.rs:99:9: 99:28
5353
- // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(*const i32, *mut i32, usize) {copy_nonoverlapping::<i32>}, val: Value(<ZST>) }
5454
+ copy_nonoverlapping(dst = move _8, src = move _4, count = const 0_usize); // scope 3 at $DIR/lower_intrinsics.rs:+4:9: +4:95
5555
+ goto -> bb1; // scope 3 at $DIR/lower_intrinsics.rs:+4:9: +4:95

tests/mir-opt/lower_intrinsics.option_payload.LowerIntrinsics.diff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
_4 = &raw const (*_1); // scope 1 at $DIR/lower_intrinsics.rs:+2:55: +2:56
2525
- _3 = option_payload_ptr::<usize>(move _4) -> [return: bb1, unwind unreachable]; // scope 1 at $DIR/lower_intrinsics.rs:+2:18: +2:57
2626
- // mir::Constant
27-
- // + span: $DIR/lower_intrinsics.rs:132:18: 132:54
27+
- // + span: $DIR/lower_intrinsics.rs:133:18: 133:54
2828
- // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(*const Option<usize>) -> *const usize {option_payload_ptr::<usize>}, val: Value(<ZST>) }
2929
+ _3 = &raw const (((*_4) as Some).0: usize); // scope 1 at $DIR/lower_intrinsics.rs:+2:18: +2:57
3030
+ goto -> bb1; // scope 1 at $DIR/lower_intrinsics.rs:+2:18: +2:57
@@ -37,7 +37,7 @@
3737
_6 = &raw const (*_2); // scope 2 at $DIR/lower_intrinsics.rs:+3:55: +3:56
3838
- _5 = option_payload_ptr::<String>(move _6) -> [return: bb2, unwind unreachable]; // scope 2 at $DIR/lower_intrinsics.rs:+3:18: +3:57
3939
- // mir::Constant
40-
- // + span: $DIR/lower_intrinsics.rs:133:18: 133:54
40+
- // + span: $DIR/lower_intrinsics.rs:134:18: 134:54
4141
- // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(*const Option<String>) -> *const String {option_payload_ptr::<String>}, val: Value(<ZST>) }
4242
+ _5 = &raw const (((*_6) as Some).0: std::string::String); // scope 2 at $DIR/lower_intrinsics.rs:+3:18: +3:57
4343
+ goto -> bb2; // scope 2 at $DIR/lower_intrinsics.rs:+3:18: +3:57

tests/mir-opt/lower_intrinsics.read_via_copy_primitive.LowerIntrinsics.diff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
_2 = &raw const (*_1); // scope 1 at $DIR/lower_intrinsics.rs:+1:46: +1:47
1414
- _0 = read_via_copy::<i32>(move _2) -> [return: bb1, unwind unreachable]; // scope 1 at $DIR/lower_intrinsics.rs:+1:14: +1:48
1515
- // mir::Constant
16-
- // + span: $DIR/lower_intrinsics.rs:118:14: 118:45
16+
- // + span: $DIR/lower_intrinsics.rs:119:14: 119:45
1717
- // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(*const i32) -> i32 {read_via_copy::<i32>}, val: Value(<ZST>) }
1818
+ _0 = (*_2); // scope 1 at $DIR/lower_intrinsics.rs:+1:14: +1:48
1919
+ goto -> bb1; // scope 1 at $DIR/lower_intrinsics.rs:+1:14: +1:48

tests/mir-opt/lower_intrinsics.read_via_copy_uninhabited.LowerIntrinsics.diff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
_2 = &raw const (*_1); // scope 1 at $DIR/lower_intrinsics.rs:+1:46: +1:47
1414
- _0 = read_via_copy::<Never>(move _2) -> unwind unreachable; // scope 1 at $DIR/lower_intrinsics.rs:+1:14: +1:48
1515
- // mir::Constant
16-
- // + span: $DIR/lower_intrinsics.rs:123:14: 123:45
16+
- // + span: $DIR/lower_intrinsics.rs:124:14: 124:45
1717
- // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(*const Never) -> Never {read_via_copy::<Never>}, val: Value(<ZST>) }
1818
+ unreachable; // scope 1 at $DIR/lower_intrinsics.rs:+1:14: +1:48
1919
}

tests/mir-opt/lower_intrinsics.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// unit-test: LowerIntrinsics
22
// ignore-wasm32 compiled with panic=abort by default
33

4-
#![feature(core_intrinsics, intrinsics)]
4+
#![feature(core_intrinsics, intrinsics, rustc_attrs)]
55
#![crate_type = "lib"]
66

77
// EMIT_MIR lower_intrinsics.wrapping.LowerIntrinsics.diff
@@ -87,6 +87,7 @@ pub fn discriminant<T>(t: T) {
8787

8888
extern "rust-intrinsic" {
8989
// Cannot use `std::intrinsics::copy_nonoverlapping` as that is a wrapper function
90+
#[rustc_nounwind]
9091
fn copy_nonoverlapping<T>(src: *const T, dst: *mut T, count: usize);
9192
}
9293

tests/mir-opt/lower_intrinsics.with_overflow.LowerIntrinsics.diff

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
_5 = _2; // scope 0 at $DIR/lower_intrinsics.rs:+1:53: +1:54
3333
- _3 = add_with_overflow::<i32>(move _4, move _5) -> [return: bb1, unwind unreachable]; // scope 0 at $DIR/lower_intrinsics.rs:+1:14: +1:55
3434
- // mir::Constant
35-
- // + span: $DIR/lower_intrinsics.rs:111:14: 111:49
35+
- // + span: $DIR/lower_intrinsics.rs:112:14: 112:49
3636
- // + literal: Const { ty: extern "rust-intrinsic" fn(i32, i32) -> (i32, bool) {add_with_overflow::<i32>}, val: Value(<ZST>) }
3737
+ _3 = CheckedAdd(move _4, move _5); // scope 0 at $DIR/lower_intrinsics.rs:+1:14: +1:55
3838
+ goto -> bb1; // scope 0 at $DIR/lower_intrinsics.rs:+1:14: +1:55
@@ -48,7 +48,7 @@
4848
_8 = _2; // scope 1 at $DIR/lower_intrinsics.rs:+2:53: +2:54
4949
- _6 = sub_with_overflow::<i32>(move _7, move _8) -> [return: bb2, unwind unreachable]; // scope 1 at $DIR/lower_intrinsics.rs:+2:14: +2:55
5050
- // mir::Constant
51-
- // + span: $DIR/lower_intrinsics.rs:112:14: 112:49
51+
- // + span: $DIR/lower_intrinsics.rs:113:14: 113:49
5252
- // + literal: Const { ty: extern "rust-intrinsic" fn(i32, i32) -> (i32, bool) {sub_with_overflow::<i32>}, val: Value(<ZST>) }
5353
+ _6 = CheckedSub(move _7, move _8); // scope 1 at $DIR/lower_intrinsics.rs:+2:14: +2:55
5454
+ goto -> bb2; // scope 1 at $DIR/lower_intrinsics.rs:+2:14: +2:55
@@ -64,7 +64,7 @@
6464
_11 = _2; // scope 2 at $DIR/lower_intrinsics.rs:+3:53: +3:54
6565
- _9 = mul_with_overflow::<i32>(move _10, move _11) -> [return: bb3, unwind unreachable]; // scope 2 at $DIR/lower_intrinsics.rs:+3:14: +3:55
6666
- // mir::Constant
67-
- // + span: $DIR/lower_intrinsics.rs:113:14: 113:49
67+
- // + span: $DIR/lower_intrinsics.rs:114:14: 114:49
6868
- // + literal: Const { ty: extern "rust-intrinsic" fn(i32, i32) -> (i32, bool) {mul_with_overflow::<i32>}, val: Value(<ZST>) }
6969
+ _9 = CheckedMul(move _10, move _11); // scope 2 at $DIR/lower_intrinsics.rs:+3:14: +3:55
7070
+ goto -> bb3; // scope 2 at $DIR/lower_intrinsics.rs:+3:14: +3:55

0 commit comments

Comments
 (0)