/// Test trivial phi elimination for sealed blocks.
///
/// A phi is "trivial" when all predecessors provide the same value.
/// For sealed blocks (where all predecessors are known upfront), trivial
/// phis are detected and eliminated, using the value directly.

/// Both branches of an if/else provide the same value for x.
/// The merge block uses 42 directly - no block param needed.
fn condSameValue(cond: bool) -> i32 {
    let x: i32 = 42;
    if cond {
        // ...
    } else {
        // ...
    }
    return x;
}

/// Nested if where all paths provide the same value.
/// Both merge blocks use 7 directly - no phis needed.
fn nestedCond(a: bool, b: bool) -> i32 {
    let x: i32 = 7;
    if a {
        if b {
            // ...
        }
        // ...
    }
    // ...
    return x;
}

/// If-else with assignments that both assign the same param value.
/// The merge uses %1 (val param) directly - no block param.
fn condSameParam(cond: bool, val: i32) -> i32 {
    let mut result: i32 = 0;
    if cond {
        result = val;
    } else {
        result = val;
    }
    return result;
}
