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 / f-fills.oir

60 lines · 1326 bytes Raw Blame History
1omegair 1
2type %t32 = array u32 16
3type %t33 = ref edit host %t32
4type %t34 = slice edit host u32
5global @g0 %t32 zero
6fn @f0 flags 0 %1:%t34 %2:u32 -> u64
7block ^0
8%3 = fill %0 %1 %2
9%4 = len u64 %1
10retv %3 %4
11end
12export @f1 flags 0 -> i32
13block ^0
14%1 = gaddr %t33 @g0
15%2 = const u64 3
16%3 = len u64 %1
17%4 = const u64 7
18%5 = sub u64 %3 %4
19%6 = chk.slice 3 %0 %1 %2 %5
20%7 = slice %t34 %6 %1 %2 %5
21%8 = const u32 7
22%9 %10 = call u64 %6 @f0 %7 %8
23%11 = const u64 15
24%12 = const u64 0
25%13 = chk.slice 3 %9 %1 %11 %12
26%14 = slice %t34 %13 %1 %11 %12
27%15 = const u32 99
28%16 %17 = call u64 %13 @f0 %14 %15
29%18 = const u64 2
30%19 = const u64 1
31%20 = chk.bounds 3 %16 %1 %18 %19
32%21 = load u32 %20 %1 %18
33%22 = const u64 3
34%23 = chk.bounds 3 %20 %1 %22 %19
35%24 = load u32 %23 %1 %22
36%25 = const u64 11
37%26 = chk.bounds 3 %23 %1 %25 %19
38%27 = load u32 %26 %1 %25
39%28 = const u64 12
40%29 = chk.bounds 3 %26 %1 %28 %19
41%30 = load u32 %29 %1 %28
42%31 = chk.bounds 3 %29 %1 %11 %19
43%32 = load u32 %31 %1 %11
44%33 = const u32 64
45%34 = mul u32 %21 %33
46%35 = add u32 %34 %24
47%36 = const u32 2
48%37 = mul u32 %27 %36
49%38 = add u32 %35 %37
50%39 = const u32 128
51%40 = mul u32 %30 %39
52%41 = add u32 %38 %40
53%42 = add u32 %41 %32
54%43 = conv u32 0 %10
55%44 = add u32 %42 %43
56%45 = conv u32 0 %17
57%46 = add u32 %44 %45
58%47 = conv i32 0 %46
59retv %31 %47
60end