fn simple_merge(sym: &Symbol, expr: &Expr) -> bool {
    match expr.kind {
        Merge {
            ref builder,
            ref value,
        } => {
            if let Ident(ref s) = builder.kind {
                if s == sym {
                    return !value.contains_symbol(sym);
                }
            }
            false
        }
        If {
            ref cond,
            ref on_true,
            ref on_false,
        } => {
            !cond.contains_symbol(sym) && simple_merge(sym, on_true) && simple_merge(sym, on_false)
        }
        _ => false,
    }
}
Checks that `expr` performs only one `Merge` per control path - this guarantees
that the loop containing `expr`'s size can be inferred.
weld/src/optimizer/transforms/size_inference.rs