fn match_types(root_ty: &Type, expr: &mut Expr) {
    expr.ty = root_ty.clone();
    match expr.kind {
        If {
            ref mut on_true,
            ref mut on_false,
            ..
        } => {
            match_types(root_ty, on_true);
            match_types(root_ty, on_false);
        }
        Select {
            ref mut on_true,
            ref mut on_false,
            ..
        } => {
            match_types(root_ty, on_true);
            match_types(root_ty, on_false);
        }
        Let { ref mut body, .. } => {
            match_types(root_ty, body);
        }
        _ => {}
    };
}
Given a root type, forces each expression to return that type. TODO For now, only supporting
expressions which can be builders. We might want to factor this out to be somewhere else.
weld/src/optimizer/transforms/loop_fusion.rs