@@ -154,225 +154,226 @@ InstructionSet Compiler::isaOfHWIntrinsic(NamedIntrinsic intrinsic)
154154//  Arguments:
155155//     intrinsic -- id of the intrinsic function.
156156//     method    -- method handle of the intrinsic function.
157+ //     sig       -- signature of the intrinsic call
157158// 
158159//  Return Value:
159160//     the expanded intrinsic.
160161// 
161- GenTree* Compiler::impX86HWIntrinsic (NamedIntrinsic intrinsic, CORINFO_METHOD_HANDLE method)
162+ GenTree* Compiler::impX86HWIntrinsic (NamedIntrinsic intrinsic, CORINFO_METHOD_HANDLE method, CORINFO_SIG_INFO* sig )
162163{
163164    InstructionSet isa = isaOfHWIntrinsic (intrinsic);
164165    switch  (isa)
165166    {
166167        case  InstructionSet_SSE:
167-             return  impSSEIntrinsic (intrinsic, method);
168+             return  impSSEIntrinsic (intrinsic, method, sig );
168169        case  InstructionSet_SSE2:
169-             return  impSSE2Intrinsic (intrinsic, method);
170+             return  impSSE2Intrinsic (intrinsic, method, sig );
170171        case  InstructionSet_SSE3:
171-             return  impSSE3Intrinsic (intrinsic, method);
172+             return  impSSE3Intrinsic (intrinsic, method, sig );
172173        case  InstructionSet_SSSE3:
173-             return  impSSSE3Intrinsic (intrinsic, method);
174+             return  impSSSE3Intrinsic (intrinsic, method, sig );
174175        case  InstructionSet_SSE41:
175-             return  impSSE41Intrinsic (intrinsic, method);
176+             return  impSSE41Intrinsic (intrinsic, method, sig );
176177        case  InstructionSet_SSE42:
177-             return  impSSE42Intrinsic (intrinsic, method);
178+             return  impSSE42Intrinsic (intrinsic, method, sig );
178179        case  InstructionSet_AVX:
179-             return  impAVXIntrinsic (intrinsic, method);
180+             return  impAVXIntrinsic (intrinsic, method, sig );
180181        case  InstructionSet_AVX2:
181-             return  impAVX2Intrinsic (intrinsic, method);
182+             return  impAVX2Intrinsic (intrinsic, method, sig );
182183
183184        case  InstructionSet_AES:
184-             return  impAESIntrinsic (intrinsic, method);
185+             return  impAESIntrinsic (intrinsic, method, sig );
185186        case  InstructionSet_BMI1:
186-             return  impBMI1Intrinsic (intrinsic, method);
187+             return  impBMI1Intrinsic (intrinsic, method, sig );
187188        case  InstructionSet_BMI2:
188-             return  impBMI2Intrinsic (intrinsic, method);
189+             return  impBMI2Intrinsic (intrinsic, method, sig );
189190        case  InstructionSet_FMA:
190-             return  impFMAIntrinsic (intrinsic, method);
191+             return  impFMAIntrinsic (intrinsic, method, sig );
191192        case  InstructionSet_LZCNT:
192-             return  impLZCNTIntrinsic (intrinsic, method);
193+             return  impLZCNTIntrinsic (intrinsic, method, sig );
193194        case  InstructionSet_PCLMULQDQ:
194-             return  impPCLMULQDQIntrinsic (intrinsic, method);
195+             return  impPCLMULQDQIntrinsic (intrinsic, method, sig );
195196        case  InstructionSet_POPCNT:
196-             return  impPOPCNTIntrinsic (intrinsic, method);
197+             return  impPOPCNTIntrinsic (intrinsic, method, sig );
197198        default :
198199            return  nullptr ;
199200    }
200201}
201202
202- GenTree* Compiler::impSSEIntrinsic (NamedIntrinsic intrinsic, CORINFO_METHOD_HANDLE method)
203+ GenTree* Compiler::impSSEIntrinsic (NamedIntrinsic intrinsic, CORINFO_METHOD_HANDLE method, CORINFO_SIG_INFO* sig )
203204{
204205    switch  (intrinsic)
205206    {
206207        case  NI_SSE_IsSupported:
207-             return  gtNewIconNode (opts. compSupports (InstructionSet_SSE));
208+             return  gtNewIconNode (compSupports (InstructionSet_SSE));
208209
209210        default :
210211            return  nullptr ;
211212    }
212213}
213214
214- GenTree* Compiler::impSSE2Intrinsic (NamedIntrinsic intrinsic, CORINFO_METHOD_HANDLE method)
215+ GenTree* Compiler::impSSE2Intrinsic (NamedIntrinsic intrinsic, CORINFO_METHOD_HANDLE method, CORINFO_SIG_INFO* sig )
215216{
216217    switch  (intrinsic)
217218    {
218219        case  NI_SSE2_IsSupported:
219-             return  gtNewIconNode (opts. compSupports (InstructionSet_SSE2));
220+             return  gtNewIconNode (compSupports (InstructionSet_SSE2));
220221
221222        default :
222223            return  nullptr ;
223224    }
224225}
225226
226- GenTree* Compiler::impSSE3Intrinsic (NamedIntrinsic intrinsic, CORINFO_METHOD_HANDLE method)
227+ GenTree* Compiler::impSSE3Intrinsic (NamedIntrinsic intrinsic, CORINFO_METHOD_HANDLE method, CORINFO_SIG_INFO* sig )
227228{
228229    switch  (intrinsic)
229230    {
230231        case  NI_SSE3_IsSupported:
231-             return  gtNewIconNode (opts. compSupports (InstructionSet_SSE3));
232+             return  gtNewIconNode (compSupports (InstructionSet_SSE3));
232233
233234        default :
234235            return  nullptr ;
235236    }
236237}
237238
238- GenTree* Compiler::impSSSE3Intrinsic (NamedIntrinsic intrinsic, CORINFO_METHOD_HANDLE method)
239+ GenTree* Compiler::impSSSE3Intrinsic (NamedIntrinsic intrinsic, CORINFO_METHOD_HANDLE method, CORINFO_SIG_INFO* sig )
239240{
240241    switch  (intrinsic)
241242    {
242243        case  NI_SSSE3_IsSupported:
243-             return  gtNewIconNode (opts. compSupports (InstructionSet_SSSE3));
244+             return  gtNewIconNode (compSupports (InstructionSet_SSSE3));
244245
245246        default :
246247            return  nullptr ;
247248    }
248249}
249250
250- GenTree* Compiler::impSSE41Intrinsic (NamedIntrinsic intrinsic, CORINFO_METHOD_HANDLE method)
251+ GenTree* Compiler::impSSE41Intrinsic (NamedIntrinsic intrinsic, CORINFO_METHOD_HANDLE method, CORINFO_SIG_INFO* sig )
251252{
252253    switch  (intrinsic)
253254    {
254255        case  NI_SSE41_IsSupported:
255-             return  gtNewIconNode (opts. compSupports (InstructionSet_SSE41));
256+             return  gtNewIconNode (compSupports (InstructionSet_SSE41));
256257
257258        default :
258259            return  nullptr ;
259260    }
260261}
261262
262- GenTree* Compiler::impSSE42Intrinsic (NamedIntrinsic intrinsic, CORINFO_METHOD_HANDLE method)
263+ GenTree* Compiler::impSSE42Intrinsic (NamedIntrinsic intrinsic, CORINFO_METHOD_HANDLE method, CORINFO_SIG_INFO* sig )
263264{
264265    switch  (intrinsic)
265266    {
266267        case  NI_SSE42_IsSupported:
267-             return  gtNewIconNode (opts. compSupports (InstructionSet_SSE42));
268+             return  gtNewIconNode (compSupports (InstructionSet_SSE42));
268269
269270        default :
270271            return  nullptr ;
271272    }
272273}
273274
274- GenTree* Compiler::impAVXIntrinsic (NamedIntrinsic intrinsic, CORINFO_METHOD_HANDLE method)
275+ GenTree* Compiler::impAVXIntrinsic (NamedIntrinsic intrinsic, CORINFO_METHOD_HANDLE method, CORINFO_SIG_INFO* sig )
275276{
276277    switch  (intrinsic)
277278    {
278279        case  NI_AVX_IsSupported:
279-             return  gtNewIconNode (opts. compSupports (InstructionSet_AVX));
280+             return  gtNewIconNode (compSupports (InstructionSet_AVX));
280281
281282        default :
282283            return  nullptr ;
283284    }
284285}
285286
286- GenTree* Compiler::impAVX2Intrinsic (NamedIntrinsic intrinsic, CORINFO_METHOD_HANDLE method)
287+ GenTree* Compiler::impAVX2Intrinsic (NamedIntrinsic intrinsic, CORINFO_METHOD_HANDLE method, CORINFO_SIG_INFO* sig )
287288{
288289    switch  (intrinsic)
289290    {
290291        case  NI_AVX2_IsSupported:
291-             return  gtNewIconNode (opts. compSupports (InstructionSet_AVX2));
292+             return  gtNewIconNode (compSupports (InstructionSet_AVX2));
292293
293294        default :
294295            return  nullptr ;
295296    }
296297}
297298
298- GenTree* Compiler::impAESIntrinsic (NamedIntrinsic intrinsic, CORINFO_METHOD_HANDLE method)
299+ GenTree* Compiler::impAESIntrinsic (NamedIntrinsic intrinsic, CORINFO_METHOD_HANDLE method, CORINFO_SIG_INFO* sig )
299300{
300301    switch  (intrinsic)
301302    {
302303        case  NI_AES_IsSupported:
303-             return  gtNewIconNode (opts. compSupports (InstructionSet_AES));
304+             return  gtNewIconNode (compSupports (InstructionSet_AES));
304305
305306        default :
306307            return  nullptr ;
307308    }
308309}
309310
310- GenTree* Compiler::impBMI1Intrinsic (NamedIntrinsic intrinsic, CORINFO_METHOD_HANDLE method)
311+ GenTree* Compiler::impBMI1Intrinsic (NamedIntrinsic intrinsic, CORINFO_METHOD_HANDLE method, CORINFO_SIG_INFO* sig )
311312{
312313    switch  (intrinsic)
313314    {
314315        case  NI_BMI1_IsSupported:
315-             return  gtNewIconNode (opts. compSupports (InstructionSet_BMI1));
316+             return  gtNewIconNode (compSupports (InstructionSet_BMI1));
316317
317318        default :
318319            return  nullptr ;
319320    }
320321}
321322
322- GenTree* Compiler::impBMI2Intrinsic (NamedIntrinsic intrinsic, CORINFO_METHOD_HANDLE method)
323+ GenTree* Compiler::impBMI2Intrinsic (NamedIntrinsic intrinsic, CORINFO_METHOD_HANDLE method, CORINFO_SIG_INFO* sig )
323324{
324325    switch  (intrinsic)
325326    {
326327        case  NI_BMI2_IsSupported:
327-             return  gtNewIconNode (opts. compSupports (InstructionSet_BMI2));
328+             return  gtNewIconNode (compSupports (InstructionSet_BMI2));
328329
329330        default :
330331            return  nullptr ;
331332    }
332333}
333334
334- GenTree* Compiler::impFMAIntrinsic (NamedIntrinsic intrinsic, CORINFO_METHOD_HANDLE method)
335+ GenTree* Compiler::impFMAIntrinsic (NamedIntrinsic intrinsic, CORINFO_METHOD_HANDLE method, CORINFO_SIG_INFO* sig )
335336{
336337    switch  (intrinsic)
337338    {
338339        case  NI_FMA_IsSupported:
339-             return  gtNewIconNode (opts. compSupports (InstructionSet_FMA));
340+             return  gtNewIconNode (compSupports (InstructionSet_FMA));
340341
341342        default :
342343            return  nullptr ;
343344    }
344345}
345346
346- GenTree* Compiler::impLZCNTIntrinsic (NamedIntrinsic intrinsic, CORINFO_METHOD_HANDLE method)
347+ GenTree* Compiler::impLZCNTIntrinsic (NamedIntrinsic intrinsic, CORINFO_METHOD_HANDLE method, CORINFO_SIG_INFO* sig )
347348{
348349    switch  (intrinsic)
349350    {
350351        case  NI_LZCNT_IsSupported:
351-             return  gtNewIconNode (opts. compSupports (InstructionSet_LZCNT));
352+             return  gtNewIconNode (compSupports (InstructionSet_LZCNT));
352353
353354        default :
354355            return  nullptr ;
355356    }
356357}
357358
358- GenTree* Compiler::impPCLMULQDQIntrinsic (NamedIntrinsic intrinsic, CORINFO_METHOD_HANDLE method)
359+ GenTree* Compiler::impPCLMULQDQIntrinsic (NamedIntrinsic intrinsic, CORINFO_METHOD_HANDLE method, CORINFO_SIG_INFO* sig )
359360{
360361    switch  (intrinsic)
361362    {
362363        case  NI_PCLMULQDQ_IsSupported:
363-             return  gtNewIconNode (opts. compSupports (InstructionSet_PCLMULQDQ));
364+             return  gtNewIconNode (compSupports (InstructionSet_PCLMULQDQ));
364365
365366        default :
366367            return  nullptr ;
367368    }
368369}
369370
370- GenTree* Compiler::impPOPCNTIntrinsic (NamedIntrinsic intrinsic, CORINFO_METHOD_HANDLE method)
371+ GenTree* Compiler::impPOPCNTIntrinsic (NamedIntrinsic intrinsic, CORINFO_METHOD_HANDLE method, CORINFO_SIG_INFO* sig )
371372{
372373    switch  (intrinsic)
373374    {
374375        case  NI_POPCNT_IsSupported:
375-             return  gtNewIconNode (opts. compSupports (InstructionSet_POPCNT));
376+             return  gtNewIconNode (compSupports (InstructionSet_POPCNT));
376377
377378        default :
378379            return  nullptr ;
0 commit comments