2022-08-30 00:57:49 +02:00
|
|
|
// unit-test: DataflowConstProp
|
|
|
|
|
|
|
|
// EMIT_MIR issue_81605.f.DataflowConstProp.diff
|
2024-01-08 16:58:58 -08:00
|
|
|
|
|
|
|
// CHECK-LABEL: fn f
|
2022-08-30 00:57:49 +02:00
|
|
|
fn f() -> usize {
|
2024-01-08 16:58:58 -08:00
|
|
|
// 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 }
|
2024-01-08 16:58:58 -08:00
|
|
|
// CHECK: _0 = const 2_usize;
|
2022-08-30 00:57:49 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
f();
|
|
|
|
}
|