<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/124802>124802</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[AMDGPU] Review intrinsic flags for `int_amdgcn_s_sendmsg`
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
raiseirql
</td>
</tr>
</table>
<pre>
This intrinsic and others in the immediate area are not setting the `IntrNoCallback` flag. Not having this intrinsic prevents `PostOrderFunctionAttrsPass` from marking a function that uses the intrinsic from having the `norecurse` flag applied. Ultimately, that then causes the `amdhsa_uses_dynamic_stack` flag to be set for the kernel.
The use case for this is in our implementation of `print()` for Mojo that uses the intrinsic to build a native `hostcall()` implementation. Fixing the intrinsic to have this flag set fixes the problem locally. Other intrinsics such as `int_amdgcn_s_sleep` do not have the same problem because they derive from `DefaultAttrsIntrinsic`. Other options are likely available in our LLVM pipeline config, but fixing the intrinsic so far has been the easiest path.
cc: @arsenm
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJx0VM2O2zYQfhr6MoghUZZsH3Rws3ARIJssiqRXYySNJGYpUuWM3PjtC9L2uosgFwkgh9_PzEcisxkcUa3KP1T5tMJFRh_qgIbJhH_sqvHdpf42GgbjJBjHpgV0HXgZKcRFkJHATBN1BoUAA2H8gPMCTCLGDalEVdknJ-GL_4jWNti-qiqD3uKwhi9eYMTztfId0xzoTE44nn7xLF9DR-G4uFaMdweRwC_InJCCn2DC8BpREPpbDciIAgsTX3W-Iaf6N9Ikz_lA7RKY7soA59ka6tbw3YqZUMhelP54xZSRHLT4Bq2qDKduZDzFpVN3cTiZ9sTyP6sgHhqKbYHeh3TslYIju1bZQWWHbyNFrdAi060itiO12S8BzDRbmsgJJm--j6xzME6U3im9Tzw-wLP_4X_rPGpYjO0AwaGYc5I-epYWrX3gvOdaw9H8vPfqHdaIZ7rqTA6TN_PzxjoH31iawPoIflnD1xibBwADL-0ImAZsnJxw6obWnfjElmiOOjqfonSjIWCcHrgNpQnEjQt0FKKbNFlVZU_U42IlpeTTnVBV2V2En6MxTmG15pXsBfCMxmJj6d7wz5__fobZzGSNI2i9680QE9AsyeWvDWEPPQYYkaEhul4OQjbEAjPKeBt026riAGqTYWByE6y6uuj2xR5XVOfbYpftqk1ersa60k1ZbEsqdF501BfNTpdb6hGLclfk1XZlap3pMsv1Lt9uqrJcb3LKW93hruz2mW72apPRhMaurT1Pax-GlWFeqM71ZpfplcWGLKfrr7WjfyHtKq3jaxDqeOhDswysNpk1LPyAESM2vRuH56c_X76r8gn-orOJEI9bZnHgFMlf5kuum3hQVbZagq1HkZlVcVD6qPRxMDIuzbr1k9LHSHj7fZiD_0GtKH1MMlnp483Hudb_BQAA__8g5qdN">