rust/tests/mir-opt/dataflow-const-prop/if.rs

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

13 lines
246 B
Rust
Raw Normal View History

// skip-filecheck
// unit-test: DataflowConstProp
// EMIT_MIR if.main.DataflowConstProp.diff
fn main() {
let a = 1;
let b = if a == 1 { 2 } else { 3 };
let c = b + 1;
let d = if a == 1 { a } else { a + 1 };
let e = d + 1;
}