From 386fff34f79be519d0a5ef023f5fea367a5e16f8 Mon Sep 17 00:00:00 2001 From: Camille GILLOT Date: Mon, 16 Oct 2023 19:39:34 +0000 Subject: [PATCH] FileCheck duplicate_switch_targets. --- ...plicate_switch_targets.assert_zero.InstSimplify.diff} | 0 .../duplicate_switch_targets.rs} | 9 +++++---- 2 files changed, 5 insertions(+), 4 deletions(-) rename tests/mir-opt/{instsimplify_duplicate_switch_targets.assert_zero.InstSimplify.diff => instsimplify/duplicate_switch_targets.assert_zero.InstSimplify.diff} (100%) rename tests/mir-opt/{instsimplify_duplicate_switch_targets.rs => instsimplify/duplicate_switch_targets.rs} (75%) diff --git a/tests/mir-opt/instsimplify_duplicate_switch_targets.assert_zero.InstSimplify.diff b/tests/mir-opt/instsimplify/duplicate_switch_targets.assert_zero.InstSimplify.diff similarity index 100% rename from tests/mir-opt/instsimplify_duplicate_switch_targets.assert_zero.InstSimplify.diff rename to tests/mir-opt/instsimplify/duplicate_switch_targets.assert_zero.InstSimplify.diff diff --git a/tests/mir-opt/instsimplify_duplicate_switch_targets.rs b/tests/mir-opt/instsimplify/duplicate_switch_targets.rs similarity index 75% rename from tests/mir-opt/instsimplify_duplicate_switch_targets.rs rename to tests/mir-opt/instsimplify/duplicate_switch_targets.rs index db98bb400b9..e40bc7edaac 100644 --- a/tests/mir-opt/instsimplify_duplicate_switch_targets.rs +++ b/tests/mir-opt/instsimplify/duplicate_switch_targets.rs @@ -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 {