Skip to content

Commit 9ec8bcc

Browse files
author
Greg Roth
committed
Enable select native vector intrinsics
actually allow the given ops to take vectors add vector overload type and apply to the relevant builtins Build lowering functions to allow vector supporting intrinsics through Preliminary groupshared support. keep groupshared as vectors for 6.9. They are no longer represented as inidivual groupshared scalars. adds groupshared to the test and performs the switch to CS to allow it. Support dot product on long vecs by expanding the inrinsic into mul/mad ops like is done with integer dot products Since the or() and and() intrinsics did their own scalarization, the or/and operators would never be applied to full vectors. This leaves the scalarization for the scalarization pass, which will skip it for 6.9
1 parent 9002f71 commit 9ec8bcc

4 files changed

Lines changed: 363 additions & 115 deletions

File tree

lib/DXIL/DxilOperations.cpp

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -144,112 +144,112 @@ const OP::OpCodeProperty OP::m_OpCodeProps[(unsigned)OP::OpCode::NumOpCodes] = {
144144
"unary",
145145
Attribute::ReadNone,
146146
1,
147-
{{0x3}},
148-
{{0x0}}}, // Overloads: hf
147+
{{0x403}},
148+
{{0x3}}}, // Overloads: hf<hf
149149
{OC::Sin,
150150
"Sin",
151151
OCC::Unary,
152152
"unary",
153153
Attribute::ReadNone,
154154
1,
155-
{{0x3}},
156-
{{0x0}}}, // Overloads: hf
155+
{{0x403}},
156+
{{0x3}}}, // Overloads: hf<hf
157157
{OC::Tan,
158158
"Tan",
159159
OCC::Unary,
160160
"unary",
161161
Attribute::ReadNone,
162162
1,
163-
{{0x3}},
164-
{{0x0}}}, // Overloads: hf
163+
{{0x403}},
164+
{{0x3}}}, // Overloads: hf<hf
165165
{OC::Acos,
166166
"Acos",
167167
OCC::Unary,
168168
"unary",
169169
Attribute::ReadNone,
170170
1,
171-
{{0x3}},
172-
{{0x0}}}, // Overloads: hf
171+
{{0x403}},
172+
{{0x3}}}, // Overloads: hf<hf
173173
{OC::Asin,
174174
"Asin",
175175
OCC::Unary,
176176
"unary",
177177
Attribute::ReadNone,
178178
1,
179-
{{0x3}},
180-
{{0x0}}}, // Overloads: hf
179+
{{0x403}},
180+
{{0x3}}}, // Overloads: hf<hf
181181
{OC::Atan,
182182
"Atan",
183183
OCC::Unary,
184184
"unary",
185185
Attribute::ReadNone,
186186
1,
187-
{{0x3}},
188-
{{0x0}}}, // Overloads: hf
187+
{{0x403}},
188+
{{0x3}}}, // Overloads: hf<hf
189189
{OC::Hcos,
190190
"Hcos",
191191
OCC::Unary,
192192
"unary",
193193
Attribute::ReadNone,
194194
1,
195-
{{0x3}},
196-
{{0x0}}}, // Overloads: hf
195+
{{0x403}},
196+
{{0x3}}}, // Overloads: hf<hf
197197
{OC::Hsin,
198198
"Hsin",
199199
OCC::Unary,
200200
"unary",
201201
Attribute::ReadNone,
202202
1,
203-
{{0x3}},
204-
{{0x0}}}, // Overloads: hf
203+
{{0x403}},
204+
{{0x3}}}, // Overloads: hf<hf
205205
{OC::Htan,
206206
"Htan",
207207
OCC::Unary,
208208
"unary",
209209
Attribute::ReadNone,
210210
1,
211-
{{0x3}},
212-
{{0x0}}}, // Overloads: hf
211+
{{0x403}},
212+
{{0x3}}}, // Overloads: hf<hf
213213
{OC::Exp,
214214
"Exp",
215215
OCC::Unary,
216216
"unary",
217217
Attribute::ReadNone,
218218
1,
219-
{{0x3}},
220-
{{0x0}}}, // Overloads: hf
219+
{{0x403}},
220+
{{0x3}}}, // Overloads: hf<hf
221221
{OC::Frc,
222222
"Frc",
223223
OCC::Unary,
224224
"unary",
225225
Attribute::ReadNone,
226226
1,
227-
{{0x3}},
228-
{{0x0}}}, // Overloads: hf
227+
{{0x403}},
228+
{{0x3}}}, // Overloads: hf<hf
229229
{OC::Log,
230230
"Log",
231231
OCC::Unary,
232232
"unary",
233233
Attribute::ReadNone,
234234
1,
235-
{{0x3}},
236-
{{0x0}}}, // Overloads: hf
235+
{{0x403}},
236+
{{0x3}}}, // Overloads: hf<hf
237237
{OC::Sqrt,
238238
"Sqrt",
239239
OCC::Unary,
240240
"unary",
241241
Attribute::ReadNone,
242242
1,
243-
{{0x3}},
244-
{{0x0}}}, // Overloads: hf
243+
{{0x403}},
244+
{{0x3}}}, // Overloads: hf<hf
245245
{OC::Rsqrt,
246246
"Rsqrt",
247247
OCC::Unary,
248248
"unary",
249249
Attribute::ReadNone,
250250
1,
251-
{{0x3}},
252-
{{0x0}}}, // Overloads: hf
251+
{{0x403}},
252+
{{0x3}}}, // Overloads: hf<hf
253253

254254
// Unary float - rounding
255255
{OC::Round_ne,
@@ -258,32 +258,32 @@ const OP::OpCodeProperty OP::m_OpCodeProps[(unsigned)OP::OpCode::NumOpCodes] = {
258258
"unary",
259259
Attribute::ReadNone,
260260
1,
261-
{{0x3}},
262-
{{0x0}}}, // Overloads: hf
261+
{{0x403}},
262+
{{0x3}}}, // Overloads: hf<hf
263263
{OC::Round_ni,
264264
"Round_ni",
265265
OCC::Unary,
266266
"unary",
267267
Attribute::ReadNone,
268268
1,
269-
{{0x3}},
270-
{{0x0}}}, // Overloads: hf
269+
{{0x403}},
270+
{{0x3}}}, // Overloads: hf<hf
271271
{OC::Round_pi,
272272
"Round_pi",
273273
OCC::Unary,
274274
"unary",
275275
Attribute::ReadNone,
276276
1,
277-
{{0x3}},
278-
{{0x0}}}, // Overloads: hf
277+
{{0x403}},
278+
{{0x3}}}, // Overloads: hf<hf
279279
{OC::Round_z,
280280
"Round_z",
281281
OCC::Unary,
282282
"unary",
283283
Attribute::ReadNone,
284284
1,
285-
{{0x3}},
286-
{{0x0}}}, // Overloads: hf
285+
{{0x403}},
286+
{{0x3}}}, // Overloads: hf<hf
287287

288288
// Unary int
289289
{OC::Bfrev,
@@ -338,16 +338,16 @@ const OP::OpCodeProperty OP::m_OpCodeProps[(unsigned)OP::OpCode::NumOpCodes] = {
338338
"binary",
339339
Attribute::ReadNone,
340340
1,
341-
{{0x7}},
342-
{{0x0}}}, // Overloads: hfd
341+
{{0x407}},
342+
{{0x7}}}, // Overloads: hfd<hfd
343343
{OC::FMin,
344344
"FMin",
345345
OCC::Binary,
346346
"binary",
347347
Attribute::ReadNone,
348348
1,
349-
{{0x7}},
350-
{{0x0}}}, // Overloads: hfd
349+
{{0x407}},
350+
{{0x7}}}, // Overloads: hfd<hfd
351351

352352
// Binary int
353353
{OC::IMax,
@@ -356,16 +356,16 @@ const OP::OpCodeProperty OP::m_OpCodeProps[(unsigned)OP::OpCode::NumOpCodes] = {
356356
"binary",
357357
Attribute::ReadNone,
358358
1,
359-
{{0xe0}},
360-
{{0x0}}}, // Overloads: wil
359+
{{0x4e0}},
360+
{{0xe0}}}, // Overloads: wil<wil
361361
{OC::IMin,
362362
"IMin",
363363
OCC::Binary,
364364
"binary",
365365
Attribute::ReadNone,
366366
1,
367-
{{0xe0}},
368-
{{0x0}}}, // Overloads: wil
367+
{{0x4e0}},
368+
{{0xe0}}}, // Overloads: wil<wil
369369

370370
// Binary uint
371371
{OC::UMax,
@@ -374,16 +374,16 @@ const OP::OpCodeProperty OP::m_OpCodeProps[(unsigned)OP::OpCode::NumOpCodes] = {
374374
"binary",
375375
Attribute::ReadNone,
376376
1,
377-
{{0xe0}},
378-
{{0x0}}}, // Overloads: wil
377+
{{0x4e0}},
378+
{{0xe0}}}, // Overloads: wil<wil
379379
{OC::UMin,
380380
"UMin",
381381
OCC::Binary,
382382
"binary",
383383
Attribute::ReadNone,
384384
1,
385-
{{0xe0}},
386-
{{0x0}}}, // Overloads: wil
385+
{{0x4e0}},
386+
{{0xe0}}}, // Overloads: wil<wil
387387

388388
// Binary int with two outputs
389389
{OC::IMul,
@@ -446,8 +446,8 @@ const OP::OpCodeProperty OP::m_OpCodeProps[(unsigned)OP::OpCode::NumOpCodes] = {
446446
"tertiary",
447447
Attribute::ReadNone,
448448
1,
449-
{{0x4}},
450-
{{0x0}}}, // Overloads: d
449+
{{0x404}},
450+
{{0x4}}}, // Overloads: d<d
451451

452452
// Tertiary int
453453
{OC::IMad,

0 commit comments

Comments
 (0)