Skip to content

Commit 9ec1fc0

Browse files
committed
Add FileCheck annotations to mir-opt/issues
From #123067, this test should ensure that there is no duplicated basic block against or-patterns. Signed-off-by: Shunpoco <[email protected]>
1 parent 7f75bfa commit 9ec1fc0

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Diff for: tests/mir-opt/issues/issue_75439.rs

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,23 @@
1-
// skip-filecheck
21
// EMIT_MIR issue_75439.foo.MatchBranchSimplification.diff
32
//@ ignore-endian-big
43

54
use std::mem::transmute;
65

76
pub fn foo(bytes: [u8; 16]) -> Option<[u8; 4]> {
7+
// CHECK-LABEL: fn foo(
8+
// CHECK: bb2: {
9+
// CHECK-NEXT: 0: [[BLOCK:bb[0-9]+]]
10+
// CHECK-SAME: 4294901760: [[BLOCK]]
811
// big endian `u32`s
912
let dwords: [u32; 4] = unsafe { transmute(bytes) };
1013
const FF: u32 = 0x0000_ffff_u32.to_be();
1114
if let [0, 0, 0 | FF, ip] = dwords { Some(unsafe { transmute(ip) }) } else { None }
1215
}
1316

1417
fn main() {
18+
// CHECK-LABEL: fn main(
19+
// CHECK: bb2: {
20+
// CHECK-NEXT: 0: [[BLOCK:bb[0-9]+]]
21+
// CHECK-SAME: 4294901760: [[BLOCK]]
1522
let _ = foo([0; 16]);
1623
}

0 commit comments

Comments
 (0)