@@ -88,18 +88,11 @@ def SPIRV_FAddOp : SPIRV_ArithmeticBinaryOp<"FAdd", SPIRV_Float, [Commutative]>
88
88
let description = [{
89
89
Result Type must be a scalar or vector of floating-point type.
90
90
91
- The types of Operand 1 and Operand 2 both must be the same as Result
91
+ The types of Operand 1 and Operand 2 both must be the same as Result
92
92
Type.
93
93
94
- Results are computed per component.
94
+ Results are computed per component.
95
95
96
- <!-- End of AutoGen section -->
97
- ```
98
- float-scalar-vector-type ::= float-type |
99
- `vector<` integer-literal `x` float-type `>`
100
- fadd-op ::= ssa-id `=` `spirv.FAdd` ssa-use, ssa-use
101
- `:` float-scalar-vector-type
102
- ```
103
96
#### Example:
104
97
105
98
```mlir
@@ -117,20 +110,12 @@ def SPIRV_FDivOp : SPIRV_ArithmeticBinaryOp<"FDiv", SPIRV_Float, []> {
117
110
let description = [{
118
111
Result Type must be a scalar or vector of floating-point type.
119
112
120
- The types of Operand 1 and Operand 2 both must be the same as Result
113
+ The types of Operand 1 and Operand 2 both must be the same as Result
121
114
Type.
122
115
123
- Results are computed per component. The resulting value is undefined
116
+ Results are computed per component. The resulting value is undefined
124
117
if Operand 2 is 0.
125
118
126
- <!-- End of AutoGen section -->
127
- ```
128
- float-scalar-vector-type ::= float-type |
129
- `vector<` integer-literal `x` float-type `>`
130
- fdiv-op ::= ssa-id `=` `spirv.FDiv` ssa-use, ssa-use
131
- `:` float-scalar-vector-type
132
- ```
133
-
134
119
#### Example:
135
120
136
121
```mlir
@@ -150,21 +135,14 @@ def SPIRV_FModOp : SPIRV_ArithmeticBinaryOp<"FMod", SPIRV_Float, []> {
150
135
let description = [{
151
136
Result Type must be a scalar or vector of floating-point type.
152
137
153
- The types of Operand 1 and Operand 2 both must be the same as Result
138
+ The types of Operand 1 and Operand 2 both must be the same as Result
154
139
Type.
155
140
156
- Results are computed per component. The resulting value is undefined
141
+ Results are computed per component. The resulting value is undefined
157
142
if Operand 2 is 0. Otherwise, the result is the remainder r of Operand
158
143
1 divided by Operand 2 where if r ≠ 0, the sign of r is the same as the
159
144
sign of Operand 2.
160
145
161
- <!-- End of AutoGen section -->
162
- ```
163
- float-scalar-vector-type ::= float-type |
164
- `vector<` integer-literal `x` float-type `>`
165
- fmod-op ::= ssa-id `=` `spirv.FMod` ssa-use, ssa-use
166
- `:` float-scalar-vector-type
167
- ```
168
146
#### Example:
169
147
170
148
```mlir
@@ -182,19 +160,10 @@ def SPIRV_FMulOp : SPIRV_ArithmeticBinaryOp<"FMul", SPIRV_Float, [Commutative]>
182
160
let description = [{
183
161
Result Type must be a scalar or vector of floating-point type.
184
162
185
- The types of Operand 1 and Operand 2 both must be the same as Result
163
+ The types of Operand 1 and Operand 2 both must be the same as Result
186
164
Type.
187
165
188
- Results are computed per component.
189
-
190
- <!-- End of AutoGen section -->
191
-
192
- ```
193
- float-scalar-vector-type ::= float-type |
194
- `vector<` integer-literal `x` float-type `>`
195
- fmul-op ::= `spirv.FMul` ssa-use, ssa-use
196
- `:` float-scalar-vector-type
197
- ```
166
+ Results are computed per component.
198
167
199
168
#### Example:
200
169
@@ -218,17 +187,9 @@ def SPIRV_FNegateOp : SPIRV_ArithmeticUnaryOp<"FNegate", SPIRV_Float, []> {
218
187
let description = [{
219
188
Result Type must be a scalar or vector of floating-point type.
220
189
221
- The type of Operand must be the same as Result Type.
222
-
223
- Results are computed per component.
224
-
225
- <!-- End of AutoGen section -->
190
+ The type of Operand must be the same as Result Type.
226
191
227
- ```
228
- float-scalar-vector-type ::= float-type |
229
- `vector<` integer-literal `x` float-type `>`
230
- fmul-op ::= `spirv.FNegate` ssa-use `:` float-scalar-vector-type
231
- ```
192
+ Results are computed per component.
232
193
233
194
#### Example:
234
195
@@ -249,22 +210,14 @@ def SPIRV_FRemOp : SPIRV_ArithmeticBinaryOp<"FRem", SPIRV_Float, []> {
249
210
let description = [{
250
211
Result Type must be a scalar or vector of floating-point type.
251
212
252
- The types of Operand 1 and Operand 2 both must be the same as Result
213
+ The types of Operand 1 and Operand 2 both must be the same as Result
253
214
Type.
254
215
255
- Results are computed per component. The resulting value is undefined
216
+ Results are computed per component. The resulting value is undefined
256
217
if Operand 2 is 0. Otherwise, the result is the remainder r of Operand
257
218
1 divided by Operand 2 where if r ≠ 0, the sign of r is the same as the
258
219
sign of Operand 1.
259
220
260
- <!-- End of AutoGen section -->
261
- ```
262
- float-scalar-vector-type ::= float-type |
263
- `vector<` integer-literal `x` float-type `>`
264
- frem-op ::= ssa-id `=` `spirv.FRemOp` ssa-use, ssa-use
265
- `:` float-scalar-vector-type
266
- ```
267
-
268
221
#### Example:
269
222
270
223
```mlir
@@ -282,18 +235,10 @@ def SPIRV_FSubOp : SPIRV_ArithmeticBinaryOp<"FSub", SPIRV_Float, []> {
282
235
let description = [{
283
236
Result Type must be a scalar or vector of floating-point type.
284
237
285
- The types of Operand 1 and Operand 2 both must be the same as Result
238
+ The types of Operand 1 and Operand 2 both must be the same as Result
286
239
Type.
287
240
288
- Results are computed per component.
289
-
290
- <!-- End of AutoGen section -->
291
- ```
292
- float-scalar-vector-type ::= float-type |
293
- `vector<` integer-literal `x` float-type `>`
294
- fsub-op ::= ssa-id `=` `spirv.FRemOp` ssa-use, ssa-use
295
- `:` float-scalar-vector-type
296
- ```
241
+ Results are computed per component.
297
242
298
243
#### Example:
299
244
@@ -314,23 +259,15 @@ def SPIRV_IAddOp : SPIRV_ArithmeticBinaryOp<"IAdd",
314
259
let description = [{
315
260
Result Type must be a scalar or vector of integer type.
316
261
317
- The type of Operand 1 and Operand 2 must be a scalar or vector of
262
+ The type of Operand 1 and Operand 2 must be a scalar or vector of
318
263
integer type. They must have the same number of components as Result
319
264
Type. They must have the same component width as Result Type.
320
265
321
266
The resulting value will equal the low-order N bits of the correct
322
267
result R, where N is the component width and R is computed with enough
323
268
precision to avoid overflow and underflow.
324
269
325
- Results are computed per component.
326
-
327
- <!-- End of AutoGen section -->
328
- ```
329
- integer-scalar-vector-type ::= integer-type |
330
- `vector<` integer-literal `x` integer-type `>`
331
- iadd-op ::= ssa-id `=` `spirv.IAdd` ssa-use, ssa-use
332
- `:` integer-scalar-vector-type
333
- ```
270
+ Results are computed per component.
334
271
335
272
#### Example:
336
273
@@ -391,23 +328,15 @@ def SPIRV_IMulOp : SPIRV_ArithmeticBinaryOp<"IMul",
391
328
let description = [{
392
329
Result Type must be a scalar or vector of integer type.
393
330
394
- The type of Operand 1 and Operand 2 must be a scalar or vector of
331
+ The type of Operand 1 and Operand 2 must be a scalar or vector of
395
332
integer type. They must have the same number of components as Result
396
333
Type. They must have the same component width as Result Type.
397
334
398
335
The resulting value will equal the low-order N bits of the correct
399
336
result R, where N is the component width and R is computed with enough
400
337
precision to avoid overflow and underflow.
401
338
402
- Results are computed per component.
403
-
404
- <!-- End of AutoGen section -->
405
- ```
406
- integer-scalar-vector-type ::= integer-type |
407
- `vector<` integer-literal `x` integer-type `>`
408
- imul-op ::= ssa-id `=` `spirv.IMul` ssa-use, ssa-use
409
- `:` integer-scalar-vector-type
410
- ```
339
+ Results are computed per component.
411
340
412
341
#### Example:
413
342
@@ -431,23 +360,15 @@ def SPIRV_ISubOp : SPIRV_ArithmeticBinaryOp<"ISub",
431
360
let description = [{
432
361
Result Type must be a scalar or vector of integer type.
433
362
434
- The type of Operand 1 and Operand 2 must be a scalar or vector of
363
+ The type of Operand 1 and Operand 2 must be a scalar or vector of
435
364
integer type. They must have the same number of components as Result
436
365
Type. They must have the same component width as Result Type.
437
366
438
367
The resulting value will equal the low-order N bits of the correct
439
368
result R, where N is the component width and R is computed with enough
440
369
precision to avoid overflow and underflow.
441
370
442
- Results are computed per component.
443
-
444
- <!-- End of AutoGen section -->
445
- ```
446
- integer-scalar-vector-type ::= integer-type |
447
- `vector<` integer-literal `x` integer-type `>`
448
- isub-op ::= `spirv.ISub` ssa-use, ssa-use
449
- `:` integer-scalar-vector-type
450
- ```
371
+ Results are computed per component.
451
372
452
373
#### Example:
453
374
@@ -545,21 +466,13 @@ def SPIRV_SDivOp : SPIRV_ArithmeticBinaryOp<"SDiv",
545
466
let description = [{
546
467
Result Type must be a scalar or vector of integer type.
547
468
548
- The type of Operand 1 and Operand 2 must be a scalar or vector of
469
+ The type of Operand 1 and Operand 2 must be a scalar or vector of
549
470
integer type. They must have the same number of components as Result
550
471
Type. They must have the same component width as Result Type.
551
472
552
- Results are computed per component. The resulting value is undefined
473
+ Results are computed per component. The resulting value is undefined
553
474
if Operand 2 is 0.
554
475
555
- <!-- End of AutoGen section -->
556
- ```
557
- integer-scalar-vector-type ::= integer-type |
558
- `vector<` integer-literal `x` integer-type `>`
559
- sdiv-op ::= ssa-id `=` `spirv.SDiv` ssa-use, ssa-use
560
- `:` integer-scalar-vector-type
561
- ```
562
-
563
476
#### Example:
564
477
565
478
```mlir
@@ -583,22 +496,15 @@ def SPIRV_SModOp : SPIRV_ArithmeticBinaryOp<"SMod",
583
496
let description = [{
584
497
Result Type must be a scalar or vector of integer type.
585
498
586
- The type of Operand 1 and Operand 2 must be a scalar or vector of
499
+ The type of Operand 1 and Operand 2 must be a scalar or vector of
587
500
integer type. They must have the same number of components as Result
588
501
Type. They must have the same component width as Result Type.
589
502
590
- Results are computed per component. The resulting value is undefined
503
+ Results are computed per component. The resulting value is undefined
591
504
if Operand 2 is 0. Otherwise, the result is the remainder r of Operand
592
505
1 divided by Operand 2 where if r ≠ 0, the sign of r is the same as the
593
506
sign of Operand 2.
594
507
595
- <!-- End of AutoGen section -->
596
- ```
597
- integer-scalar-vector-type ::= integer-type |
598
- `vector<` integer-literal `x` integer-type `>`
599
- smod-op ::= ssa-id `=` `spirv.SMod` ssa-use, ssa-use
600
- `:` integer-scalar-vector-type
601
- ```
602
508
#### Example:
603
509
604
510
```mlir
@@ -683,22 +589,15 @@ def SPIRV_SRemOp : SPIRV_ArithmeticBinaryOp<"SRem",
683
589
let description = [{
684
590
Result Type must be a scalar or vector of integer type.
685
591
686
- The type of Operand 1 and Operand 2 must be a scalar or vector of
592
+ The type of Operand 1 and Operand 2 must be a scalar or vector of
687
593
integer type. They must have the same number of components as Result
688
594
Type. They must have the same component width as Result Type.
689
595
690
- Results are computed per component. The resulting value is undefined
596
+ Results are computed per component. The resulting value is undefined
691
597
if Operand 2 is 0. Otherwise, the result is the remainder r of Operand
692
598
1 divided by Operand 2 where if r ≠ 0, the sign of r is the same as the
693
599
sign of Operand 1.
694
600
695
- <!-- End of AutoGen section -->
696
- ```
697
- integer-scalar-vector-type ::= integer-type |
698
- `vector<` integer-literal `x` integer-type `>`
699
- srem-op ::= ssa-id `=` `spirv.SRem` ssa-use, ssa-use
700
- `:` integer-scalar-vector-type
701
- ```
702
601
#### Example:
703
602
704
603
```mlir
@@ -720,25 +619,17 @@ def SPIRV_UDivOp : SPIRV_ArithmeticBinaryOp<"UDiv",
720
619
Result Type must be a scalar or vector of integer type, whose Signedness
721
620
operand is 0.
722
621
723
- The types of Operand 1 and Operand 2 both must be the same as Result
622
+ The types of Operand 1 and Operand 2 both must be the same as Result
724
623
Type.
725
624
726
- Results are computed per component. The resulting value is undefined
625
+ Results are computed per component. The resulting value is undefined
727
626
if Operand 2 is 0.
728
627
729
- <!-- End of AutoGen section -->
730
- ```
731
- integer-scalar-vector-type ::= integer-type |
732
- `vector<` integer-literal `x` integer-type `>`
733
- udiv-op ::= ssa-id `=` `spirv.UDiv` ssa-use, ssa-use
734
- `:` integer-scalar-vector-type
735
- ```
736
628
#### Example:
737
629
738
630
```mlir
739
631
%4 = spirv.UDiv %0, %1 : i32
740
632
%5 = spirv.UDiv %2, %3 : vector<4xi32>
741
-
742
633
```
743
634
}];
744
635
}
@@ -823,25 +714,17 @@ def SPIRV_UModOp : SPIRV_ArithmeticBinaryOp<"UMod",
823
714
Result Type must be a scalar or vector of integer type, whose Signedness
824
715
operand is 0.
825
716
826
- The types of Operand 1 and Operand 2 both must be the same as Result
717
+ The types of Operand 1 and Operand 2 both must be the same as Result
827
718
Type.
828
719
829
- Results are computed per component. The resulting value is undefined
720
+ Results are computed per component. The resulting value is undefined
830
721
if Operand 2 is 0.
831
722
832
- <!-- End of AutoGen section -->
833
- ```
834
- integer-scalar-vector-type ::= integer-type |
835
- `vector<` integer-literal `x` integer-type `>`
836
- umod-op ::= ssa-id `=` `spirv.UMod` ssa-use, ssa-use
837
- `:` integer-scalar-vector-type
838
- ```
839
723
#### Example:
840
724
841
725
```mlir
842
726
%4 = spirv.UMod %0, %1 : i32
843
727
%5 = spirv.UMod %2, %3 : vector<4xi32>
844
-
845
728
```
846
729
}];
847
730
0 commit comments