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 / ir / x-convlo.oir

20 lines · 362 bytes Raw Blame History
1omegair 1
2fn @f0 flags 0 %1:f64 -> i32
3block ^0
4%2 = chk.conv i32 5 %0 %1
5%3 = conv i32 0 %1
6retv %2 %3
7end
8export @f1 flags 0 -> i32
9block ^0
10%1 = const f64 0xc1e0000000100000
11%2 %3 = call i32 %0 @f0 %1
12%4 = const i32 2147483647
13%5 = add i32 %3 %4
14%6 = const i32 -1
15%7 = ne bool %5 %6
16%8 = const i32 9
17%9 = const i32 3
18%10 = select i32 %7 %8 %9
19retv %2 %10
20end