<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/56712>56712</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[AMDGPU][MC][GFX90A] MIMG dst size does not match dmask and d16
</td>
</tr>
<tr>
<th>Labels</th>
<td>
bug,
backend:AMDGPU,
mc
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
dpreobra
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
dpreobra
</td>
</tr>
</table>
<pre>
Assembler checks that `MIMG` dst size matches `dmask`, `d16` and `tfe` for all GPUs except for GFX90A.
Examples of failed tests:
image_atomic_add v1, v2, s[12:19] dmask:0x3
image_load v255, v1, s[8:15] dmask:0x7 d16
Expected output:
Errors.
Actual result:
image_atomic_add v1, v2, s[12:19] dmask:0x3 ; encoding: [0x00,0x03,0x48,0xf0,0x02,0x01,0x03,0x00]
image_load v255, v1, s[8:15] dmask:0x7 d16 ; encoding: [0x00,0x07,0x00,0xf0,0x01,0xff,0x02,0x80]
The root cause of the issue is that GFX90A `MIMG` opcodes do not support `tfe` modifier. As a result, `AMDGPUAsmParser::validateMIMGDataSize` skips the necessary checks.
A fix is pending.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJylVEuPmzAQ_jVwsRoBDiQcOLCb3VUPkVZqK_W2GuwhuDExsk2U7a_vGJImqVY9tAh5mJfnmxeNke9V7Rz2jUbLRIdi75jvwLOoSLafty9EmHSeOfUTWQ-eTFzQyR7cnmiUPU5sWgRLOMjA-RYD1xrLQGv28vrNMTwJHPwke3n-Xib1Iko2UVLP59MJ-kHT1aZlLSiNknl03kW8vjVj9KgedvgG3vRKvIGU7JgGEMcsnC7KH9KMvNIyyjdsRsnr5MT_vEAbINcszyfn9OK8Dr75ve-KhfTu0A4oPGE0ox9G_wHIJ2uNdXcp1sKPoJlFN-qPXP4xLxbxB4YHYaQ67EjEyDI5JaExRPhEluuJtGdhNpP01oQc8s3_1ujvWFaXQLdYZhBte4tsfcUyn187ZNYYzwSMDsOMeJIo58ZwzvM6D9Xt2JqBgNBIScMO5OvGYTDW38xnTzhbhXbBasfg0pl5oOvthsa2dv0rWIc29IvXR9BKgscQYQMevtBShIvcXg1uwnRAgc6BfT_v0v0EsFadAuABD6FCZ2WMVVrk69VqlZfLWFZclryE2CuvsaIKzlBCSfKH7eNM52xDCwKW64ZKQwmHbKdVnfszbSV1Jx6trjrvh2mrsmd6d8p3Y7MQpidG6-OFfBqs-UEjTuxUZUcfebFKs7irBG_WrSxkk0hYlkUplw0UsOYSM56LEmMNDWoXkEdZ1ow7OqeiEgNiT6lT-HNOvzW9CN_5JlZVlmRZssrytOQ85Yu8BGjWBRfLosAiWUbLBHv6QywCzoWxu9hWE2SK5EipFf02rkpwTu0OiGc4crBoGgvnaDD6ztjqIo2nZKsp01-vOX2F">