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
omega-mv / seed / ng / tests / ir / x-convlo.oir
| 1 | omegair 1 |
| 2 | fn @f0 flags 0 %1:f64 -> i32 |
| 3 | block ^0 |
| 4 | %2 = chk.conv i32 5 %0 %1 |
| 5 | %3 = conv i32 0 %1 |
| 6 | retv %2 %3 |
| 7 | end |
| 8 | export @f1 flags 0 -> i32 |
| 9 | block ^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 |
| 19 | retv %2 %10 |
| 20 | end |