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 / c-bounds-ld.oir

53 lines · 1047 bytes Raw Blame History
1omegair 1
2type %t32 = array u8 8
3type %t33 = ref edit host %t32
4type %t34 = array i64 4
5type %t35 = ref edit host %t34
6global @g0 %t32 zero
7global @g1 %t34 zero
8fn @f0 flags 0 %1:u64 -> void
9block ^0
10%2 = gaddr %t33 @g0
11%3 = const u64 0
12br ^1 %0 %3 %1
13block ^1 %4:tok %5:u64 %6:u64
14%7 = const u64 8
15%8 = lt bool %5 %7
16cbr %4 %8 ^2 ^3
17block ^2 %9:tok
18%10 = const u64 1
19%11 = chk.bounds 3 %9 %2 %5 %10
20%12 = conv u8 0 %6
21%13 = store %11 %2 %5 %12
22%14 = const u64 8
23%15 = shr u64 %6 %14
24%16 = add u64 %5 %10
25br ^1 %13 %16 %15
26block ^3 %17:tok
27%18 = const i32 1
28%19 = const u64 0
29%20 = chk.slice 3 %17 %2 %19 %7
30%21 %22 = host i64 54 %20 %18 %2 %19 %7
31ret %21
32end
33fn @f1 flags 0 %1:u64 -> u64
34block ^0
35%2 = gaddr %t35 @g1
36%3 = const u64 1
37%4 = chk.bounds 3 %0 %2 %1 %3
38%5 = load i64 %4 %2 %1
39%6 = bitcast u64 %5
40%7 = add u64 %6 %1
41retv %4 %7
42end
43export @f2 flags 0 -> i32
44block ^0
45%1 = const u64 3
46%2 %3 = call u64 %0 @f1 %1
47%4 = call void %2 @f0 %3
48%5 = const u64 4
49%6 %7 = call u64 %4 @f1 %5
50%8 = call void %6 @f0 %7
51%9 = const i32 0
52retv %8 %9
53end