about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/mir-opt/deduplicate_blocks.is_line_doc_comment_2.DeduplicateBlocks.panic-abort.diff100
-rw-r--r--tests/mir-opt/deduplicate_blocks.is_line_doc_comment_2.DeduplicateBlocks.panic-unwind.diff100
-rw-r--r--tests/mir-opt/deduplicate_blocks.rs17
-rw-r--r--tests/ui/asm/aarch64/bad-reg.stderr2
-rw-r--r--tests/ui/asm/x86_64/bad-reg.stderr2
-rw-r--r--tests/ui/asm/x86_64/issue-82869.stderr4
6 files changed, 8 insertions, 217 deletions
diff --git a/tests/mir-opt/deduplicate_blocks.is_line_doc_comment_2.DeduplicateBlocks.panic-abort.diff b/tests/mir-opt/deduplicate_blocks.is_line_doc_comment_2.DeduplicateBlocks.panic-abort.diff
deleted file mode 100644
index 60742ef0e9a..00000000000
--- a/tests/mir-opt/deduplicate_blocks.is_line_doc_comment_2.DeduplicateBlocks.panic-abort.diff
+++ /dev/null
@@ -1,100 +0,0 @@
-- // MIR for `is_line_doc_comment_2` before DeduplicateBlocks
-+ // MIR for `is_line_doc_comment_2` after DeduplicateBlocks
-  
-  fn is_line_doc_comment_2(_1: &str) -> bool {
-      debug s => _1;
-      let mut _0: bool;
-      let mut _2: &[u8];
-      let mut _3: &str;
-      let mut _4: usize;
-      let mut _5: usize;
-      let mut _6: bool;
-      let mut _7: usize;
-      let mut _8: usize;
-      let mut _9: bool;
-  
-      bb0: {
-          StorageLive(_2);
-          StorageLive(_3);
-          _3 = &(*_1);
-          _2 = core::str::<impl str>::as_bytes(move _3) -> [return: bb1, unwind unreachable];
-      }
-  
-      bb1: {
-          StorageDead(_3);
-          _4 = Len((*_2));
-          _5 = const 4_usize;
-          _6 = Ge(move _4, move _5);
-          switchInt(move _6) -> [0: bb2, otherwise: bb3];
-      }
-  
-      bb2: {
-          _7 = Len((*_2));
-          _8 = const 3_usize;
-          _9 = Ge(move _7, move _8);
--         switchInt(move _9) -> [0: bb7, otherwise: bb8];
-+         switchInt(move _9) -> [0: bb11, otherwise: bb7];
-      }
-  
-      bb3: {
-          switchInt(copy (*_2)[0 of 4]) -> [47: bb4, otherwise: bb2];
-      }
-  
-      bb4: {
-          switchInt(copy (*_2)[1 of 4]) -> [47: bb5, otherwise: bb2];
-      }
-  
-      bb5: {
-          switchInt(copy (*_2)[2 of 4]) -> [47: bb6, otherwise: bb2];
-      }
-  
-      bb6: {
--         switchInt(copy (*_2)[3 of 4]) -> [47: bb13, otherwise: bb2];
-+         switchInt(copy (*_2)[3 of 4]) -> [47: bb11, otherwise: bb2];
-      }
-  
-      bb7: {
--         _0 = const false;
--         goto -> bb14;
-+         switchInt(copy (*_2)[0 of 3]) -> [47: bb8, otherwise: bb11];
-      }
-  
-      bb8: {
--         switchInt(copy (*_2)[0 of 3]) -> [47: bb9, otherwise: bb7];
-+         switchInt(copy (*_2)[1 of 3]) -> [47: bb9, otherwise: bb11];
-      }
-  
-      bb9: {
--         switchInt(copy (*_2)[1 of 3]) -> [47: bb10, otherwise: bb7];
-+         switchInt(copy (*_2)[2 of 3]) -> [47: bb10, 33: bb10, otherwise: bb11];
-      }
-  
-      bb10: {
--         switchInt(copy (*_2)[2 of 3]) -> [47: bb12, 33: bb11, otherwise: bb7];
--     }
-- 
--     bb11: {
-          _0 = const true;
--         goto -> bb14;
-+         goto -> bb12;
-      }
-  
--     bb12: {
--         _0 = const true;
--         goto -> bb14;
--     }
-- 
--     bb13: {
-+     bb11: {
-          _0 = const false;
--         goto -> bb14;
-+         goto -> bb12;
-      }
-  
--     bb14: {
-+     bb12: {
-          StorageDead(_2);
-          return;
-      }
-  }
-  
diff --git a/tests/mir-opt/deduplicate_blocks.is_line_doc_comment_2.DeduplicateBlocks.panic-unwind.diff b/tests/mir-opt/deduplicate_blocks.is_line_doc_comment_2.DeduplicateBlocks.panic-unwind.diff
deleted file mode 100644
index 7337a32f525..00000000000
--- a/tests/mir-opt/deduplicate_blocks.is_line_doc_comment_2.DeduplicateBlocks.panic-unwind.diff
+++ /dev/null
@@ -1,100 +0,0 @@
-- // MIR for `is_line_doc_comment_2` before DeduplicateBlocks
-+ // MIR for `is_line_doc_comment_2` after DeduplicateBlocks
-  
-  fn is_line_doc_comment_2(_1: &str) -> bool {
-      debug s => _1;
-      let mut _0: bool;
-      let mut _2: &[u8];
-      let mut _3: &str;
-      let mut _4: usize;
-      let mut _5: usize;
-      let mut _6: bool;
-      let mut _7: usize;
-      let mut _8: usize;
-      let mut _9: bool;
-  
-      bb0: {
-          StorageLive(_2);
-          StorageLive(_3);
-          _3 = &(*_1);
-          _2 = core::str::<impl str>::as_bytes(move _3) -> [return: bb1, unwind continue];
-      }
-  
-      bb1: {
-          StorageDead(_3);
-          _4 = Len((*_2));
-          _5 = const 4_usize;
-          _6 = Ge(move _4, move _5);
-          switchInt(move _6) -> [0: bb2, otherwise: bb3];
-      }
-  
-      bb2: {
-          _7 = Len((*_2));
-          _8 = const 3_usize;
-          _9 = Ge(move _7, move _8);
--         switchInt(move _9) -> [0: bb7, otherwise: bb8];
-+         switchInt(move _9) -> [0: bb11, otherwise: bb7];
-      }
-  
-      bb3: {
-          switchInt(copy (*_2)[0 of 4]) -> [47: bb4, otherwise: bb2];
-      }
-  
-      bb4: {
-          switchInt(copy (*_2)[1 of 4]) -> [47: bb5, otherwise: bb2];
-      }
-  
-      bb5: {
-          switchInt(copy (*_2)[2 of 4]) -> [47: bb6, otherwise: bb2];
-      }
-  
-      bb6: {
--         switchInt(copy (*_2)[3 of 4]) -> [47: bb13, otherwise: bb2];
-+         switchInt(copy (*_2)[3 of 4]) -> [47: bb11, otherwise: bb2];
-      }
-  
-      bb7: {
--         _0 = const false;
--         goto -> bb14;
-+         switchInt(copy (*_2)[0 of 3]) -> [47: bb8, otherwise: bb11];
-      }
-  
-      bb8: {
--         switchInt(copy (*_2)[0 of 3]) -> [47: bb9, otherwise: bb7];
-+         switchInt(copy (*_2)[1 of 3]) -> [47: bb9, otherwise: bb11];
-      }
-  
-      bb9: {
--         switchInt(copy (*_2)[1 of 3]) -> [47: bb10, otherwise: bb7];
-+         switchInt(copy (*_2)[2 of 3]) -> [47: bb10, 33: bb10, otherwise: bb11];
-      }
-  
-      bb10: {
--         switchInt(copy (*_2)[2 of 3]) -> [47: bb12, 33: bb11, otherwise: bb7];
--     }
-- 
--     bb11: {
-          _0 = const true;
--         goto -> bb14;
-+         goto -> bb12;
-      }
-  
--     bb12: {
--         _0 = const true;
--         goto -> bb14;
--     }
-- 
--     bb13: {
-+     bb11: {
-          _0 = const false;
--         goto -> bb14;
-+         goto -> bb12;
-      }
-  
--     bb14: {
-+     bb12: {
-          StorageDead(_2);
-          return;
-      }
-  }
-  
diff --git a/tests/mir-opt/deduplicate_blocks.rs b/tests/mir-opt/deduplicate_blocks.rs
deleted file mode 100644
index 3a164cb09a0..00000000000
--- a/tests/mir-opt/deduplicate_blocks.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-// skip-filecheck
-// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
-//@ test-mir-pass: DeduplicateBlocks
-
-// EMIT_MIR deduplicate_blocks.is_line_doc_comment_2.DeduplicateBlocks.diff
-pub const fn is_line_doc_comment_2(s: &str) -> bool {
-    match s.as_bytes() {
-        [b'/', b'/', b'/', b'/', ..] => false,
-        [b'/', b'/', b'/', ..] => true,
-        [b'/', b'/', b'!', ..] => true,
-        _ => false,
-    }
-}
-
-fn main() {
-    is_line_doc_comment_2("asd");
-}
diff --git a/tests/ui/asm/aarch64/bad-reg.stderr b/tests/ui/asm/aarch64/bad-reg.stderr
index 370752ad0f1..c76722f32a7 100644
--- a/tests/ui/asm/aarch64/bad-reg.stderr
+++ b/tests/ui/asm/aarch64/bad-reg.stderr
@@ -3,6 +3,8 @@ error: invalid register class `foo`: unknown register class
    |
 LL |         asm!("{}", in(foo) foo);
    |                    ^^^^^^^^^^^
+   |
+   = note: the following register classes are supported on this target: `reg`, `vreg`, `vreg_low16`, `preg`
 
 error: invalid register `foo`: unknown register
   --> $DIR/bad-reg.rs:14:18
diff --git a/tests/ui/asm/x86_64/bad-reg.stderr b/tests/ui/asm/x86_64/bad-reg.stderr
index 3df1f7b2208..6a02957210b 100644
--- a/tests/ui/asm/x86_64/bad-reg.stderr
+++ b/tests/ui/asm/x86_64/bad-reg.stderr
@@ -3,6 +3,8 @@ error: invalid register class `foo`: unknown register class
    |
 LL |         asm!("{}", in(foo) foo);
    |                    ^^^^^^^^^^^
+   |
+   = note: the following register classes are supported on this target: `reg`, `reg_abcd`, `reg_byte`, `xmm_reg`, `ymm_reg`, `zmm_reg`, `kreg`, `kreg0`, `mmx_reg`, `x87_reg`, `tmm_reg`
 
 error: invalid register `foo`: unknown register
   --> $DIR/bad-reg.rs:14:18
diff --git a/tests/ui/asm/x86_64/issue-82869.stderr b/tests/ui/asm/x86_64/issue-82869.stderr
index 3cf9d6d1c1c..56e49099569 100644
--- a/tests/ui/asm/x86_64/issue-82869.stderr
+++ b/tests/ui/asm/x86_64/issue-82869.stderr
@@ -3,12 +3,16 @@ error: invalid register class `vreg`: unknown register class
    |
 LL |     asm!("add {:d}, {:d}, d0", out(vreg) c, in(vreg) a, in("d0") {
    |                                ^^^^^^^^^^^
+   |
+   = note: the following register classes are supported on this target: `reg`, `reg_abcd`, `reg_byte`, `xmm_reg`, `ymm_reg`, `zmm_reg`, `kreg`, `kreg0`, `mmx_reg`, `x87_reg`, `tmm_reg`
 
 error: invalid register class `vreg`: unknown register class
   --> $DIR/issue-82869.rs:11:45
    |
 LL |     asm!("add {:d}, {:d}, d0", out(vreg) c, in(vreg) a, in("d0") {
    |                                             ^^^^^^^^^^
+   |
+   = note: the following register classes are supported on this target: `reg`, `reg_abcd`, `reg_byte`, `xmm_reg`, `ymm_reg`, `zmm_reg`, `kreg`, `kreg0`, `mmx_reg`, `x87_reg`, `tmm_reg`
 
 error: invalid register `d0`: unknown register
   --> $DIR/issue-82869.rs:11:57