FileCheck duplicate_switch_targets.

This commit is contained in:
Camille GILLOT 2023-10-16 19:39:34 +00:00
parent f856247cc9
commit 386fff34f7
2 changed files with 5 additions and 4 deletions

View File

@ -1,14 +1,15 @@
// skip-filecheck
// unit-test: InstSimplify
#![feature(custom_mir, core_intrinsics)]
#![crate_type = "lib"]
use std::intrinsics::mir::*;
// unit-test: InstSimplify
// EMIT_MIR instsimplify_duplicate_switch_targets.assert_zero.InstSimplify.diff
// EMIT_MIR duplicate_switch_targets.assert_zero.InstSimplify.diff
#[custom_mir(dialect = "runtime", phase = "post-cleanup")]
pub unsafe fn assert_zero(x: u8) -> u8 {
// CHECK-LABEL: fn assert_zero(
// CHECK: switchInt({{.*}}) -> [0: {{bb.*}}, otherwise: {{bb.*}}]
mir!(
{
match x {