os-rust/tests/mir-opt/dataflow-const-prop/issue_81605.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
298 B
Rust
Raw Normal View History

2022-08-30 00:57:49 +02:00
// unit-test: DataflowConstProp
// EMIT_MIR issue_81605.f.DataflowConstProp.diff
// CHECK-LABEL: fn f
2022-08-30 00:57:49 +02:00
fn f() -> usize {
// CHECK: switchInt(const true) -> [0: {{bb[0-9]+}}, otherwise: {{bb[0-9]+}}];
2022-08-30 00:57:49 +02:00
1 + if true { 1 } else { 2 }
// CHECK: _0 = const 2_usize;
2022-08-30 00:57:49 +02:00
}
fn main() {
f();
}