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 / a64 / tests / oir / v-spill-swap.oir

36 lines · 695 bytes Raw Blame History
1omegair 1
2type %t32 = vec f32 4
3fn @f0 flags 0 %1:u64 -> void
4block ^0
5ret %0
6end
7export @f1 flags 0 -> i32
8block ^0
9%1 = const f32 0x3f800000
10%2 = const f32 0x40000000
11%3 = vsplat %t32 %1
12%4 = vsplat %t32 %2
13%5 = const u64 0
14br ^1 %0 %5 %3 %4
15block ^1 %6:tok %7:u64 %8:%t32 %9:%t32
16%10 = const u64 1
17%11 = lt bool %7 %10
18cbr %6 %11 ^2 ^3
19block ^2 %12:tok
20%13 = const u64 0
21%14 = call void %12 @f0 %13
22%15 = const u64 16
23%16 = chk.fuel 4 %14 %7 %15
24%17 = const u64 1
25%18 = add u64 %7 %17
26br ^1 %16 %18 %9 %8
27block ^3 %19:tok
28%20 = vextract f32 0 %8
29%21 = vextract f32 0 %9
30%22 = conv i32 0 %20
31%23 = conv i32 0 %21
32%24 = const i32 10
33%25 = mul i32 %22 %24
34%26 = add i32 %25 %23
35retv %19 %26
36end