Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 249a36f

Browse files
committed
Update mir-opt filechecks
1 parent 32185de commit 249a36f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+356
-356
lines changed

tests/mir-opt/array_index_is_temporary.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ fn main() {
1515
// CHECK: debug x => [[x:_.*]];
1616
// CHECK: debug y => [[y:_.*]];
1717
// CHECK: [[y]] = const 1_usize;
18-
// CHECK: [[tmp:_.*]] = [[y]];
18+
// CHECK: [[tmp:_.*]] = copy [[y]];
1919
// CHECK: [[x]][[[tmp]]] =
2020
let mut x = [42, 43, 44];
2121
let mut y = 1;

tests/mir-opt/box_expr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
fn main() {
88
// CHECK-LABEL: fn main(
99
// CHECK: [[box:_.*]] = ShallowInitBox(
10-
// CHECK: [[ptr:_.*]] = ((([[box]].0: std::ptr::Unique<S>).0: std::ptr::NonNull<S>).0: *const S);
10+
// CHECK: [[ptr:_.*]] = copy ((([[box]].0: std::ptr::Unique<S>).0: std::ptr::NonNull<S>).0: *const S);
1111
// CHECK: (*[[ptr]]) = S::new() -> [return: [[ret:bb.*]], unwind: [[unwind:bb.*]]];
1212
// CHECK: [[ret]]: {
1313
// CHECK: [[box2:_.*]] = move [[box]];

tests/mir-opt/building/match/sort_candidates.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ fn disjoint_ranges(x: i32, b: bool) -> u32 {
2525
// CHECK-LABEL: fn disjoint_ranges(
2626
// CHECK: debug b => _2;
2727
// CHECK: bb0: {
28-
// CHECK: switchInt(_2) -> [0: [[jump:bb.*]], otherwise: {{bb.*}}];
28+
// CHECK: switchInt(copy _2) -> [0: [[jump:bb.*]], otherwise: {{bb.*}}];
2929
// CHECK: [[jump]]: {
3030
// CHECK-NEXT: _0 = const 3_u32;
3131
// CHECK-NEXT: return;

tests/mir-opt/building/while_storage.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ fn while_loop(c: bool) {
1515
// CHECK: bb1: {
1616
// CHECK-NEXT: StorageLive(_3);
1717
// CHECK-NEXT: StorageLive(_2);
18-
// CHECK-NEXT: _2 = _1;
18+
// CHECK-NEXT: _2 = copy _1;
1919
// CHECK-NEXT: _3 = get_bool(move _2) -> [return: bb2, unwind
2020
// CHECK: bb2: {
2121
// CHECK-NEXT: switchInt(move _3) -> [0: bb3, otherwise: bb4];
@@ -29,7 +29,7 @@ fn while_loop(c: bool) {
2929
// CHECK-NEXT: StorageDead(_2);
3030
// CHECK-NEXT: StorageLive(_5);
3131
// CHECK-NEXT: StorageLive(_4);
32-
// CHECK-NEXT: _4 = _1;
32+
// CHECK-NEXT: _4 = copy _1;
3333
// CHECK-NEXT: _5 = get_bool(move _4) -> [return: bb5, unwind
3434
// CHECK: bb5: {
3535
// CHECK-NEXT: switchInt(move _5) -> [0: bb6, otherwise: bb7];

tests/mir-opt/const_prop/address_of_pair.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ pub fn fn0() -> bool {
1010
// CHECK: (*[[ptr]]) = const true;
1111
// CHECK-NOT: = const false;
1212
// CHECK-NOT: = const true;
13-
// CHECK: [[tmp:_.*]] = ([[pair]].1: bool);
13+
// CHECK: [[tmp:_.*]] = copy ([[pair]].1: bool);
1414
// CHECK-NOT: = const false;
1515
// CHECK-NOT: = const true;
1616
// CHECK: [[ret]] = Not(move [[tmp]]);
1717
// CHECK-NOT: = const false;
1818
// CHECK-NOT: = const true;
19-
// CHECK: _0 = [[ret]];
19+
// CHECK: _0 = copy [[ret]];
2020
let mut pair = (1, false);
2121
let ptr = core::ptr::addr_of_mut!(pair.1);
2222
pair = (1, false);

tests/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ fn main() {
88
// CHECK-LABEL: fn main(
99
// CHECK: debug a => [[a:_.*]];
1010
// CHECK: debug _b => [[b:_.*]];
11-
// CHECK: [[b]] = (*[[a]])[3 of 4];
11+
// CHECK: [[b]] = copy (*[[a]])[3 of 4];
1212
let a: *const [_] = &[1, 2, 3];
1313
unsafe {
1414
let _b = (*a)[3];

tests/mir-opt/const_prop/boxes.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ fn main() {
1111
// CHECK-LABEL: fn main(
1212
// CHECK: debug x => [[x:_.*]];
1313
// CHECK: (*{{_.*}}) = const 42_i32;
14-
// CHECK: [[tmp:_.*]] = (*{{_.*}});
15-
// CHECK: [[x]] = [[tmp]];
14+
// CHECK: [[tmp:_.*]] = copy (*{{_.*}});
15+
// CHECK: [[x]] = copy [[tmp]];
1616
let x = *(#[rustc_box]
1717
Box::new(42))
1818
+ 0;

tests/mir-opt/const_prop/indirect_mutation.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ fn foo() {
1010
// CHECK: _1 = const (1_i32,);
1111
// CHECK: _2 = &mut (_1.0: i32);
1212
// CHECK: (*_2) = const 5_i32;
13-
// CHECK: _4 = (_1.0: i32);
13+
// CHECK: _4 = copy (_1.0: i32);
1414
// CHECK: _3 = Eq(move _4, const 5_i32);
1515

1616
let mut u = (1,);
@@ -25,7 +25,7 @@ fn bar() {
2525
// CHECK: debug y => _4;
2626
// CHECK: _3 = &raw mut (_1.0: i32);
2727
// CHECK: (*_3) = const 5_i32;
28-
// CHECK: _5 = (_1.0: i32);
28+
// CHECK: _5 = copy (_1.0: i32);
2929
// CHECK: _4 = Eq(move _5, const 5_i32);
3030

3131
let mut v = (1,);

tests/mir-opt/const_prop/mutable_variable.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ fn main() {
77
// CHECK: debug y => [[y:_.*]];
88
// CHECK: [[x]] = const 42_i32;
99
// CHECK: [[x]] = const 99_i32;
10-
// CHECK: [[y]] = [[x]];
10+
// CHECK: [[y]] = copy [[x]];
1111
let mut x = 42;
1212
x = 99;
1313
let y = x;

tests/mir-opt/const_prop/mutable_variable_aggregate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ fn main() {
88
// CHECK: debug y => [[y:_.*]];
99
// CHECK: [[x]] = const (42_i32, 43_i32);
1010
// CHECK: ([[x]].1: i32) = const 99_i32;
11-
// CHECK: [[y]] = [[x]];
11+
// CHECK: [[y]] = copy [[x]];
1212
let mut x = (42, 43);
1313
x.1 = 99;
1414
let y = x;

0 commit comments

Comments
 (0)