interplane.Get Omega
Read in your language

omega-mv

Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.

Brought by drakestapleton

branch main Branches Tags History

omega-mv / seed / ng / tests / opt / x-divmin.oir

20 lines · 377 bytes Raw Blame History
1omegair 1
2fn @f0 flags 0 %1:i64 %2:i64 -> i64
3block ^0
4%3 = chk.divz 2 %0 %2
5%4 = chk.divovf 1 %3 %1 %2
6%5 = div i64 %1 %2
7retv %4 %5
8end
9export @f1 flags 0 -> i32
10block ^0
11%1 = const i64 -9223372036854775807
12%2 = const i64 1
13%3 = chk.sub 1 %0 %1 %2
14%4 = sub i64 %1 %2
15%5 = const i64 -1
16%6 %7 = call i64 %3 @f0 %4 %5
17%8 = chk.conv i32 5 %6 %7
18%9 = conv i32 0 %7
19retv %8 %9
20end