mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-04 19:29:07 +00:00
Rollup merge of #134943 - Shunpoco:116971-mir-opt-issues, r=DianQK
Add FileCheck annotations to mir-opt/issues This resolves a part of #116971 . The directory `tests/mir-opt/issues` has only one test issue_75439.rs which should add FileCheck annotations. Originally it was introduced in #75580 to confirm that there were duplicated basic blocks against or-patterns, but in #123067 the duplication was resolved. So FileCheck should ensure that there is no such duplication any more.
This commit is contained in:
commit
d9c34a7ad2
@ -1,10 +1,14 @@
|
|||||||
// skip-filecheck
|
|
||||||
// EMIT_MIR issue_75439.foo.MatchBranchSimplification.diff
|
// EMIT_MIR issue_75439.foo.MatchBranchSimplification.diff
|
||||||
//@ ignore-endian-big
|
//@ ignore-endian-big
|
||||||
|
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
|
|
||||||
pub fn foo(bytes: [u8; 16]) -> Option<[u8; 4]> {
|
pub fn foo(bytes: [u8; 16]) -> Option<[u8; 4]> {
|
||||||
|
// CHECK-LABEL: fn foo(
|
||||||
|
// CHECK: bb2: {
|
||||||
|
// CHECK-NEXT: 0: [[bb:bb[0-9]+]],
|
||||||
|
// CHECK-SAME: {{[0-9]+}}: [[bb]],
|
||||||
|
|
||||||
// big endian `u32`s
|
// big endian `u32`s
|
||||||
let dwords: [u32; 4] = unsafe { transmute(bytes) };
|
let dwords: [u32; 4] = unsafe { transmute(bytes) };
|
||||||
const FF: u32 = 0x0000_ffff_u32.to_be();
|
const FF: u32 = 0x0000_ffff_u32.to_be();
|
||||||
|
Loading…
Reference in New Issue
Block a user