vyre-foundation 0.4.1

Foundation layer: IR, type system, memory model, wire format. Zero application semantics. Part of the vyre GPU compiler.
Documentation
1
2
3
4
5
6
7
8
9
10
use crate::ir::Expr;

#[inline]
pub(crate) fn const_loop_empty(from: &Expr, to: &Expr) -> bool {
    match (from, to) {
        (Expr::LitU32(from), Expr::LitU32(to)) => from >= to,
        (Expr::LitI32(from), Expr::LitI32(to)) => from >= to,
        _ => false,
    }
}