midenc-codegen-masm 0.7.1

Miden Assembly backend for the Miden compiler
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
public builtin.function @test(v0: u32, v1: u32) -> u32 {
^block0(v0: u32, v1: u32):
    v2 = arith.constant 0 : u32;
    v3 = arith.eq v0, v1 : i1;
    v4 = scf.if v3 : u32 {
    ^block1:
        v5 = arith.constant 1 : u32;
        scf.yield v5;
    } else {
    ^block2:
        v6 = arith.mul v0, v2 : u32 #[overflow = checked];
        scf.yield v6;
    };
    builtin.ret v4;
};