simple2.hir 378 B
fn simple2(x: i32) -> i32
zero = constant(i32, 0)
one = constant(i32, 1)
loop = region(start, if_true)
idx = phi(loop, zero, idx_inc)
idx_inc = add(idx, one)
fac = phi(loop, one, fac_acc)
fac_acc = mul(fac, idx_inc)
in_bounds = lt(idx_inc, x)
if = if(loop, in_bounds)
if_false = projection(if, 0)
if_true = projection(if, 1)
r = return(if_false, fac_acc)