diff options
Diffstat (limited to 'src/test/mir-opt/const_prop/switch_int.rs')
-rw-r--r-- | src/test/mir-opt/const_prop/switch_int.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/mir-opt/const_prop/switch_int.rs b/src/test/mir-opt/const_prop/switch_int.rs new file mode 100644 index 000000000..d7319eca1 --- /dev/null +++ b/src/test/mir-opt/const_prop/switch_int.rs @@ -0,0 +1,11 @@ +#[inline(never)] +fn foo(_: i32) { } + +// EMIT_MIR switch_int.main.ConstProp.diff +// EMIT_MIR switch_int.main.SimplifyConstCondition-after-const-prop.diff +fn main() { + match 1 { + 1 => foo(0), + _ => foo(-1), + } +} |