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-f32-ops.oir

260 lines · 6545 bytes Raw Blame History
1omegair 1
2type %t32 = array f32 16
3type %t33 = ref edit host %t32
4type %t34 = slice edit host f32
5type %t35 = vec f32 4
6type %t36 = array u8 96
7type %t37 = ref edit host %t36
8type %t38 = ref view host %t36
9global @g0 %t32 zero
10global @g1 %t36 zero
11fn @f0 flags 0 %1:u64 %2:u32 -> void
12block ^0
13%3 = gaddr %t37 @g1
14%4 = const u64 1
15%5 = const u32 8
16%6 = const u32 16
17%7 = const u32 24
18%8 = conv u8 0 %2
19%9 = chk.bounds 3 %0 %3 %1 %4
20%10 = store %9 %3 %1 %8
21%11 = const u64 1
22%12 = chk.add 1 %10 %1 %11
23%13 = add u64 %1 %11
24%14 = chk.shift 7 %12 %5
25%15 = shr u32 %2 %5
26%16 = conv u8 0 %15
27%17 = chk.bounds 3 %14 %3 %13 %4
28%18 = store %17 %3 %13 %16
29%19 = const u64 2
30%20 = chk.add 1 %18 %1 %19
31%21 = add u64 %1 %19
32%22 = chk.shift 7 %20 %6
33%23 = shr u32 %2 %6
34%24 = conv u8 0 %23
35%25 = chk.bounds 3 %22 %3 %21 %4
36%26 = store %25 %3 %21 %24
37%27 = const u64 3
38%28 = chk.add 1 %26 %1 %27
39%29 = add u64 %1 %27
40%30 = chk.shift 7 %28 %7
41%31 = shr u32 %2 %7
42%32 = conv u8 0 %31
43%33 = chk.bounds 3 %30 %3 %29 %4
44%34 = store %33 %3 %29 %32
45ret %34
46end
47export @f1 flags 0 -> i32
48block ^0
49%1 = gaddr %t33 @g0
50%2 = const u64 1
51%3 = const u64 4
52%4 = const u64 0
53%5 = const f32 0x3f800001
54%6 = chk.bounds 3 %0 %1 %4 %2
55%7 = store %6 %1 %4 %5
56%8 = const u64 1
57%9 = const f32 0x3f7ff001
58%10 = chk.bounds 3 %7 %1 %8 %2
59%11 = store %10 %1 %8 %9
60%12 = const u64 2
61%13 = const f32 0x3fc00000
62%14 = chk.bounds 3 %11 %1 %12 %2
63%15 = store %14 %1 %12 %13
64%16 = const u64 3
65%17 = const f32 0xc0200000
66%18 = chk.bounds 3 %15 %1 %16 %2
67%19 = store %18 %1 %16 %17
68%20 = const u64 4
69%21 = const f32 0x3f7ffffe
70%22 = chk.bounds 3 %19 %1 %20 %2
71%23 = store %22 %1 %20 %21
72%24 = const u64 5
73%25 = const f32 0x33800800
74%26 = chk.bounds 3 %23 %1 %24 %2
75%27 = store %26 %1 %24 %25
76%28 = const u64 6
77%29 = const f32 0x40100000
78%30 = chk.bounds 3 %27 %1 %28 %2
79%31 = store %30 %1 %28 %29
80%32 = const u64 7
81%33 = const f32 0x40800000
82%34 = chk.bounds 3 %31 %1 %32 %2
83%35 = store %34 %1 %32 %33
84%36 = const u64 8
85%37 = const f32 0xbf800000
86%38 = chk.bounds 3 %35 %1 %36 %2
87%39 = store %38 %1 %36 %37
88%40 = const u64 9
89%41 = const f32 0x3f800000
90%42 = chk.bounds 3 %39 %1 %40 %2
91%43 = store %42 %1 %40 %41
92%44 = const u64 10
93%45 = const f32 0xbec00000
94%46 = chk.bounds 3 %43 %1 %44 %2
95%47 = store %46 %1 %44 %45
96%48 = const u64 11
97%49 = const f32 0x41280000
98%50 = chk.bounds 3 %47 %1 %48 %2
99%51 = store %50 %1 %48 %49
100%52 = const u64 0
101%53 = const u64 4
102%54 = const u64 8
103%55 = chk.bounds 3 %51 %1 %52 %3
104%56 = vload %t35 %55 %1 %52
105%57 = chk.bounds 3 %55 %1 %53 %3
106%58 = vload %t35 %57 %1 %53
107%59 = chk.bounds 3 %57 %1 %54 %3
108%60 = vload %t35 %59 %1 %54
109%61 = add u64 %52 %2
110%62 = chk.bounds 3 %59 %1 %61 %3
111%63 = vload %t35 %62 %1 %61
112%64 = const f32 0x3f000000
113%65 = vsplat %t35 %64
114%66 = add %t35 %56 %58
115%67 = sub %t35 %56 %60
116%68 = mul %t35 %63 %65
117%69 = fma %t35 %56 %58 %60
118%70 = const u64 12
119%71 = chk.slice 3 %62 %1 %70 %3
120%72 = slice %t34 %71 %1 %70 %3
121%73 = chk.bounds 3 %71 %72 %52 %3
122%74 = vstore %73 %72 %52 %69
123%75 = chk.bounds 3 %74 %72 %52 %3
124%76 = vload %t35 %75 %72 %52
125%77 = add u64 %2 %2
126%78 = chk.bounds 3 %75 %1 %77 %3
127%79 = vstore %78 %1 %77 %68
128%80 = chk.bounds 3 %79 %1 %77 %3
129%81 = vload %t35 %80 %1 %77
130%82 = const u32 0
131%83 = vextract f32 0 %65
132%84 = bitcast u32 %83
133%85 = const u64 0
134%86 = call void %80 @f0 %85 %84
135%87 = xor u32 %82 %84
136%88 = vextract f32 1 %65
137%89 = bitcast u32 %88
138%90 = const u64 4
139%91 = call void %86 @f0 %90 %89
140%92 = xor u32 %87 %89
141%93 = vextract f32 2 %65
142%94 = bitcast u32 %93
143%95 = const u64 8
144%96 = call void %91 @f0 %95 %94
145%97 = xor u32 %92 %94
146%98 = vextract f32 3 %65
147%99 = bitcast u32 %98
148%100 = const u64 12
149%101 = call void %96 @f0 %100 %99
150%102 = xor u32 %97 %99
151%103 = vextract f32 0 %66
152%104 = bitcast u32 %103
153%105 = const u64 16
154%106 = call void %101 @f0 %105 %104
155%107 = xor u32 %102 %104
156%108 = vextract f32 1 %66
157%109 = bitcast u32 %108
158%110 = const u64 20
159%111 = call void %106 @f0 %110 %109
160%112 = xor u32 %107 %109
161%113 = vextract f32 2 %66
162%114 = bitcast u32 %113
163%115 = const u64 24
164%116 = call void %111 @f0 %115 %114
165%117 = xor u32 %112 %114
166%118 = vextract f32 3 %66
167%119 = bitcast u32 %118
168%120 = const u64 28
169%121 = call void %116 @f0 %120 %119
170%122 = xor u32 %117 %119
171%123 = vextract f32 0 %67
172%124 = bitcast u32 %123
173%125 = const u64 32
174%126 = call void %121 @f0 %125 %124
175%127 = xor u32 %122 %124
176%128 = vextract f32 1 %67
177%129 = bitcast u32 %128
178%130 = const u64 36
179%131 = call void %126 @f0 %130 %129
180%132 = xor u32 %127 %129
181%133 = vextract f32 2 %67
182%134 = bitcast u32 %133
183%135 = const u64 40
184%136 = call void %131 @f0 %135 %134
185%137 = xor u32 %132 %134
186%138 = vextract f32 3 %67
187%139 = bitcast u32 %138
188%140 = const u64 44
189%141 = call void %136 @f0 %140 %139
190%142 = xor u32 %137 %139
191%143 = vextract f32 0 %81
192%144 = bitcast u32 %143
193%145 = const u64 48
194%146 = call void %141 @f0 %145 %144
195%147 = xor u32 %142 %144
196%148 = vextract f32 1 %81
197%149 = bitcast u32 %148
198%150 = const u64 52
199%151 = call void %146 @f0 %150 %149
200%152 = xor u32 %147 %149
201%153 = vextract f32 2 %81
202%154 = bitcast u32 %153
203%155 = const u64 56
204%156 = call void %151 @f0 %155 %154
205%157 = xor u32 %152 %154
206%158 = vextract f32 3 %81
207%159 = bitcast u32 %158
208%160 = const u64 60
209%161 = call void %156 @f0 %160 %159
210%162 = xor u32 %157 %159
211%163 = vextract f32 0 %69
212%164 = bitcast u32 %163
213%165 = const u64 64
214%166 = call void %161 @f0 %165 %164
215%167 = xor u32 %162 %164
216%168 = vextract f32 1 %69
217%169 = bitcast u32 %168
218%170 = const u64 68
219%171 = call void %166 @f0 %170 %169
220%172 = xor u32 %167 %169
221%173 = vextract f32 2 %69
222%174 = bitcast u32 %173
223%175 = const u64 72
224%176 = call void %171 @f0 %175 %174
225%177 = xor u32 %172 %174
226%178 = vextract f32 3 %69
227%179 = bitcast u32 %178
228%180 = const u64 76
229%181 = call void %176 @f0 %180 %179
230%182 = xor u32 %177 %179
231%183 = vextract f32 0 %76
232%184 = bitcast u32 %183
233%185 = const u64 80
234%186 = call void %181 @f0 %185 %184
235%187 = xor u32 %182 %184
236%188 = vextract f32 1 %76
237%189 = bitcast u32 %188
238%190 = const u64 84
239%191 = call void %186 @f0 %190 %189
240%192 = xor u32 %187 %189
241%193 = vextract f32 2 %76
242%194 = bitcast u32 %193
243%195 = const u64 88
244%196 = call void %191 @f0 %195 %194
245%197 = xor u32 %192 %194
246%198 = vextract f32 3 %76
247%199 = bitcast u32 %198
248%200 = const u64 92
249%201 = call void %196 @f0 %200 %199
250%202 = xor u32 %197 %199
251%203 = gaddr %t38 @g1
252%204 = const u64 96
253%205 = const i32 1
254%206 = chk.slice 3 %201 %203 %52 %204
255%207 %208 = host i64 54 %206 %205 %203 %52 %204
256%209 = const u32 255
257%210 = and u32 %202 %209
258%211 = conv i32 0 %210
259retv %207 %211
260end