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

Commit 7a1bfc0

Browse files
committed
Add more // unit-tests to MIR opt tests
1 parent 9ee22ff commit 7a1bfc0

36 files changed

+167
-186
lines changed

src/test/mir-opt/bool_compare.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// unit-test: InstCombine
2+
13
// EMIT_MIR bool_compare.opt1.InstCombine.diff
24
fn opt1(x: bool) -> u32 {
35
if x != true { 0 } else { 1 }

src/test/mir-opt/combine_array_len.norm2.InstCombine.64bit.diff

Lines changed: 0 additions & 77 deletions
This file was deleted.

src/test/mir-opt/combine_array_len.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// EMIT_MIR_FOR_EACH_BIT_WIDTH
1+
// unit-test: InstCombine
22
// EMIT_MIR combine_array_len.norm2.InstCombine.diff
33

44
fn norm2(x: [f32; 2]) -> f32 {

src/test/mir-opt/const_goto.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// unit-test: ConstGoto
2+
13
pub enum Foo {
24
A,
35
B,

src/test/mir-opt/const_goto_storage.match_nested_if.ConstGoto.diff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
bb0: {
1818
StorageLive(_1); // scope 0 at $DIR/const_goto_storage.rs:+1:9: +1:12
1919
- StorageLive(_2); // scope 0 at $DIR/const_goto_storage.rs:+1:21: +1:23
20-
- nop; // scope 0 at $DIR/const_goto_storage.rs:+1:21: +1:23
20+
- Deinit(_2); // scope 0 at $DIR/const_goto_storage.rs:+1:21: +1:23
2121
- StorageLive(_3); // scope 0 at $DIR/const_goto_storage.rs:+2:15: +6:10
2222
- StorageLive(_4); // scope 0 at $DIR/const_goto_storage.rs:+2:18: +2:76
2323
- StorageLive(_5); // scope 0 at $DIR/const_goto_storage.rs:+2:21: +2:52

src/test/mir-opt/const_goto_storage.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// unit-test: ConstGoto
2+
13
// EMIT_MIR const_goto_storage.match_nested_if.ConstGoto.diff
24
fn match_nested_if() -> bool {
35
let val = match () {

src/test/mir-opt/deaggregator_test.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// unit-test: Deaggregator
2+
13
struct Baz {
24
x: usize,
35
y: f32,

src/test/mir-opt/deaggregator_test_enum.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// unit-test: Deaggregator
2+
13
enum Baz {
24
Empty,
35
Foo { x: usize },

src/test/mir-opt/deaggregator_test_enum_2.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// unit-test: Deaggregator
12
// Test that deaggregate fires in more than one basic block
23

34
enum Foo {

0 commit comments

Comments
 (0)