FileCheck duplicate_switch_targets.
This commit is contained in:
parent
f856247cc9
commit
386fff34f7
@ -1,14 +1,15 @@
|
|||||||
// skip-filecheck
|
// unit-test: InstSimplify
|
||||||
|
|
||||||
#![feature(custom_mir, core_intrinsics)]
|
#![feature(custom_mir, core_intrinsics)]
|
||||||
#![crate_type = "lib"]
|
#![crate_type = "lib"]
|
||||||
|
|
||||||
use std::intrinsics::mir::*;
|
use std::intrinsics::mir::*;
|
||||||
|
|
||||||
// unit-test: InstSimplify
|
// EMIT_MIR duplicate_switch_targets.assert_zero.InstSimplify.diff
|
||||||
|
|
||||||
// EMIT_MIR instsimplify_duplicate_switch_targets.assert_zero.InstSimplify.diff
|
|
||||||
#[custom_mir(dialect = "runtime", phase = "post-cleanup")]
|
#[custom_mir(dialect = "runtime", phase = "post-cleanup")]
|
||||||
pub unsafe fn assert_zero(x: u8) -> u8 {
|
pub unsafe fn assert_zero(x: u8) -> u8 {
|
||||||
|
// CHECK-LABEL: fn assert_zero(
|
||||||
|
// CHECK: switchInt({{.*}}) -> [0: {{bb.*}}, otherwise: {{bb.*}}]
|
||||||
mir!(
|
mir!(
|
||||||
{
|
{
|
||||||
match x {
|
match x {
|
Loading…
Reference in New Issue
Block a user