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-fma-alias.oir

335 lines · 7800 bytes Raw Blame History
1omegair 1
2type %t32 = vec f32 4
3type %t33 = vec f64 2
4type %t34 = array u8 128
5type %t35 = ref edit host %t34
6type %t36 = ref view host %t34
7global @g0 %t34 zero
8fn @f0 flags 0 %1:u64 %2:u32 -> void
9block ^0
10%3 = gaddr %t35 @g0
11%4 = const u64 1
12%5 = const u32 8
13%6 = const u32 16
14%7 = const u32 24
15%8 = conv u8 0 %2
16%9 = chk.bounds 3 %0 %3 %1 %4
17%10 = store %9 %3 %1 %8
18%11 = const u64 1
19%12 = chk.add 1 %10 %1 %11
20%13 = add u64 %1 %11
21%14 = chk.shift 7 %12 %5
22%15 = shr u32 %2 %5
23%16 = conv u8 0 %15
24%17 = chk.bounds 3 %14 %3 %13 %4
25%18 = store %17 %3 %13 %16
26%19 = const u64 2
27%20 = chk.add 1 %18 %1 %19
28%21 = add u64 %1 %19
29%22 = chk.shift 7 %20 %6
30%23 = shr u32 %2 %6
31%24 = conv u8 0 %23
32%25 = chk.bounds 3 %22 %3 %21 %4
33%26 = store %25 %3 %21 %24
34%27 = const u64 3
35%28 = chk.add 1 %26 %1 %27
36%29 = add u64 %1 %27
37%30 = chk.shift 7 %28 %7
38%31 = shr u32 %2 %7
39%32 = conv u8 0 %31
40%33 = chk.bounds 3 %30 %3 %29 %4
41%34 = store %33 %3 %29 %32
42ret %34
43end
44fn @f1 flags 0 %1:u64 %2:u64 -> void
45block ^0
46%3 = gaddr %t35 @g0
47%4 = const u64 1
48%5 = conv u8 0 %2
49%6 = chk.bounds 3 %0 %3 %1 %4
50%7 = store %6 %3 %1 %5
51%8 = const u64 1
52%9 = chk.add 1 %7 %1 %8
53%10 = add u64 %1 %8
54%11 = const u64 8
55%12 = chk.shift 7 %9 %11
56%13 = shr u64 %2 %11
57%14 = conv u8 0 %13
58%15 = chk.bounds 3 %12 %3 %10 %4
59%16 = store %15 %3 %10 %14
60%17 = const u64 2
61%18 = chk.add 1 %16 %1 %17
62%19 = add u64 %1 %17
63%20 = const u64 16
64%21 = chk.shift 7 %18 %20
65%22 = shr u64 %2 %20
66%23 = conv u8 0 %22
67%24 = chk.bounds 3 %21 %3 %19 %4
68%25 = store %24 %3 %19 %23
69%26 = const u64 3
70%27 = chk.add 1 %25 %1 %26
71%28 = add u64 %1 %26
72%29 = const u64 24
73%30 = chk.shift 7 %27 %29
74%31 = shr u64 %2 %29
75%32 = conv u8 0 %31
76%33 = chk.bounds 3 %30 %3 %28 %4
77%34 = store %33 %3 %28 %32
78%35 = const u64 4
79%36 = chk.add 1 %34 %1 %35
80%37 = add u64 %1 %35
81%38 = const u64 32
82%39 = chk.shift 7 %36 %38
83%40 = shr u64 %2 %38
84%41 = conv u8 0 %40
85%42 = chk.bounds 3 %39 %3 %37 %4
86%43 = store %42 %3 %37 %41
87%44 = const u64 5
88%45 = chk.add 1 %43 %1 %44
89%46 = add u64 %1 %44
90%47 = const u64 40
91%48 = chk.shift 7 %45 %47
92%49 = shr u64 %2 %47
93%50 = conv u8 0 %49
94%51 = chk.bounds 3 %48 %3 %46 %4
95%52 = store %51 %3 %46 %50
96%53 = const u64 6
97%54 = chk.add 1 %52 %1 %53
98%55 = add u64 %1 %53
99%56 = const u64 48
100%57 = chk.shift 7 %54 %56
101%58 = shr u64 %2 %56
102%59 = conv u8 0 %58
103%60 = chk.bounds 3 %57 %3 %55 %4
104%61 = store %60 %3 %55 %59
105%62 = const u64 7
106%63 = chk.add 1 %61 %1 %62
107%64 = add u64 %1 %62
108%65 = const u64 56
109%66 = chk.shift 7 %63 %65
110%67 = shr u64 %2 %65
111%68 = conv u8 0 %67
112%69 = chk.bounds 3 %66 %3 %64 %4
113%70 = store %69 %3 %64 %68
114ret %70
115end
116fn @f2 flags 0 %1:%t32 %2:%t32 %3:%t32 -> %t32
117block ^0
118%4 = fma %t32 %1 %2 %3
119%5 = add %t32 %4 %2
120%6 = sub %t32 %5 %3
121retv %0 %6
122end
123fn @f3 flags 0 %1:%t32 %2:%t32 %3:%t32 -> %t32
124block ^0
125%4 = fma %t32 %1 %2 %3
126%5 = add %t32 %4 %1
127%6 = sub %t32 %5 %3
128retv %0 %6
129end
130fn @f4 flags 0 %1:%t32 %2:%t32 %3:%t32 -> %t32
131block ^0
132%4 = fma %t32 %1 %2 %3
133%5 = add %t32 %4 %1
134%6 = sub %t32 %5 %2
135retv %0 %6
136end
137fn @f5 flags 0 %1:%t32 %2:%t32 %3:%t32 -> %t32
138block ^0
139%4 = fma %t32 %1 %2 %3
140%5 = add %t32 %4 %1
141%6 = sub %t32 %5 %2
142%7 = add %t32 %6 %3
143retv %0 %7
144end
145fn @f6 flags 0 %1:%t33 %2:%t33 %3:%t33 -> %t33
146block ^0
147%4 = fma %t33 %1 %2 %3
148%5 = add %t33 %4 %2
149%6 = sub %t33 %5 %3
150retv %0 %6
151end
152fn @f7 flags 0 %1:%t33 %2:%t33 %3:%t33 -> %t33
153block ^0
154%4 = fma %t33 %1 %2 %3
155%5 = add %t33 %4 %1
156%6 = sub %t33 %5 %3
157retv %0 %6
158end
159fn @f8 flags 0 %1:%t33 %2:%t33 %3:%t33 -> %t33
160block ^0
161%4 = fma %t33 %1 %2 %3
162%5 = add %t33 %4 %1
163%6 = sub %t33 %5 %2
164retv %0 %6
165end
166fn @f9 flags 0 %1:%t33 %2:%t33 %3:%t33 -> %t33
167block ^0
168%4 = fma %t33 %1 %2 %3
169%5 = add %t33 %4 %1
170%6 = sub %t33 %5 %2
171%7 = add %t33 %6 %3
172retv %0 %7
173end
174export @f10 flags 0 -> i32
175block ^0
176%1 = const f32 0x40200000
177%2 = const f32 0x40600000
178%3 = const f32 0xc0a00000
179%4 = vsplat %t32 %1
180%5 = vsplat %t32 %2
181%6 = vsplat %t32 %3
182%7 %8 = call %t32 %0 @f2 %4 %5 %6
183%9 %10 = call %t32 %7 @f3 %4 %5 %6
184%11 %12 = call %t32 %9 @f4 %4 %5 %6
185%13 %14 = call %t32 %11 @f5 %4 %5 %6
186%15 = const f64 0x4004000000000000
187%16 = const f64 0x400c000000000000
188%17 = const f64 0xc014000000000000
189%18 = vsplat %t33 %15
190%19 = vsplat %t33 %16
191%20 = vsplat %t33 %17
192%21 %22 = call %t33 %13 @f6 %18 %19 %20
193%23 %24 = call %t33 %21 @f7 %18 %19 %20
194%25 %26 = call %t33 %23 @f8 %18 %19 %20
195%27 %28 = call %t33 %25 @f9 %18 %19 %20
196%29 = const u32 0
197%30 = vextract f32 0 %8
198%31 = bitcast u32 %30
199%32 = const u64 0
200%33 = call void %27 @f0 %32 %31
201%34 = xor u32 %29 %31
202%35 = vextract f32 1 %8
203%36 = bitcast u32 %35
204%37 = const u64 4
205%38 = call void %33 @f0 %37 %36
206%39 = xor u32 %34 %36
207%40 = vextract f32 2 %8
208%41 = bitcast u32 %40
209%42 = const u64 8
210%43 = call void %38 @f0 %42 %41
211%44 = xor u32 %39 %41
212%45 = vextract f32 3 %8
213%46 = bitcast u32 %45
214%47 = const u64 12
215%48 = call void %43 @f0 %47 %46
216%49 = xor u32 %44 %46
217%50 = vextract f32 0 %10
218%51 = bitcast u32 %50
219%52 = const u64 16
220%53 = call void %48 @f0 %52 %51
221%54 = xor u32 %49 %51
222%55 = vextract f32 1 %10
223%56 = bitcast u32 %55
224%57 = const u64 20
225%58 = call void %53 @f0 %57 %56
226%59 = xor u32 %54 %56
227%60 = vextract f32 2 %10
228%61 = bitcast u32 %60
229%62 = const u64 24
230%63 = call void %58 @f0 %62 %61
231%64 = xor u32 %59 %61
232%65 = vextract f32 3 %10
233%66 = bitcast u32 %65
234%67 = const u64 28
235%68 = call void %63 @f0 %67 %66
236%69 = xor u32 %64 %66
237%70 = vextract f32 0 %12
238%71 = bitcast u32 %70
239%72 = const u64 32
240%73 = call void %68 @f0 %72 %71
241%74 = xor u32 %69 %71
242%75 = vextract f32 1 %12
243%76 = bitcast u32 %75
244%77 = const u64 36
245%78 = call void %73 @f0 %77 %76
246%79 = xor u32 %74 %76
247%80 = vextract f32 2 %12
248%81 = bitcast u32 %80
249%82 = const u64 40
250%83 = call void %78 @f0 %82 %81
251%84 = xor u32 %79 %81
252%85 = vextract f32 3 %12
253%86 = bitcast u32 %85
254%87 = const u64 44
255%88 = call void %83 @f0 %87 %86
256%89 = xor u32 %84 %86
257%90 = vextract f32 0 %14
258%91 = bitcast u32 %90
259%92 = const u64 48
260%93 = call void %88 @f0 %92 %91
261%94 = xor u32 %89 %91
262%95 = vextract f32 1 %14
263%96 = bitcast u32 %95
264%97 = const u64 52
265%98 = call void %93 @f0 %97 %96
266%99 = xor u32 %94 %96
267%100 = vextract f32 2 %14
268%101 = bitcast u32 %100
269%102 = const u64 56
270%103 = call void %98 @f0 %102 %101
271%104 = xor u32 %99 %101
272%105 = vextract f32 3 %14
273%106 = bitcast u32 %105
274%107 = const u64 60
275%108 = call void %103 @f0 %107 %106
276%109 = xor u32 %104 %106
277%110 = vextract f64 0 %22
278%111 = bitcast u64 %110
279%112 = const u64 64
280%113 = call void %108 @f1 %112 %111
281%114 = conv u32 0 %111
282%115 = xor u32 %109 %114
283%116 = vextract f64 1 %22
284%117 = bitcast u64 %116
285%118 = const u64 72
286%119 = call void %113 @f1 %118 %117
287%120 = conv u32 0 %117
288%121 = xor u32 %115 %120
289%122 = vextract f64 0 %24
290%123 = bitcast u64 %122
291%124 = const u64 80
292%125 = call void %119 @f1 %124 %123
293%126 = conv u32 0 %123
294%127 = xor u32 %121 %126
295%128 = vextract f64 1 %24
296%129 = bitcast u64 %128
297%130 = const u64 88
298%131 = call void %125 @f1 %130 %129
299%132 = conv u32 0 %129
300%133 = xor u32 %127 %132
301%134 = vextract f64 0 %26
302%135 = bitcast u64 %134
303%136 = const u64 96
304%137 = call void %131 @f1 %136 %135
305%138 = conv u32 0 %135
306%139 = xor u32 %133 %138
307%140 = vextract f64 1 %26
308%141 = bitcast u64 %140
309%142 = const u64 104
310%143 = call void %137 @f1 %142 %141
311%144 = conv u32 0 %141
312%145 = xor u32 %139 %144
313%146 = vextract f64 0 %28
314%147 = bitcast u64 %146
315%148 = const u64 112
316%149 = call void %143 @f1 %148 %147
317%150 = conv u32 0 %147
318%151 = xor u32 %145 %150
319%152 = vextract f64 1 %28
320%153 = bitcast u64 %152
321%154 = const u64 120
322%155 = call void %149 @f1 %154 %153
323%156 = conv u32 0 %153
324%157 = xor u32 %151 %156
325%158 = const u64 0
326%159 = const u64 128
327%160 = const i32 1
328%161 = gaddr %t36 @g0
329%162 = chk.slice 3 %155 %161 %158 %159
330%163 %164 = host i64 54 %162 %160 %161 %158 %159
331%165 = const u32 255
332%166 = and u32 %157 %165
333%167 = conv i32 0 %166
334retv %163 %167
335end