<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/59899>59899</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[AMDGPU] dissasembling v_fma_mix_f32 with literals and opsel shows incorrect constant
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
DadSchoorse
</td>
</tr>
</table>
<pre>
Currently, the amdgpu disassembler truncates literals when opsel_lo is set, nomatter what opsel_hi for that operand is.
See the following example:
```
v_fma_mix_f32 v4, v1, 0x4a00, 0x4a00 op_sel:[0,1,1] op_sel_hi:[0,0,1] ; cc207004 03fdff01 4b804a00
```
Here, the first second operand is shown correctly as `0x4a00`, but the third operand uses the high half of the literal (`0x4b80`) instead. Either both operands should show the full 32bit literal `0x4b804a00`, or the correct 16bit half according to opsel_hi.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxsU8uO6zYM_Rp5Q9xAlh-xF17cmTTtpkCBQdeBLNGRCtkKRDqZ-fvCStJMgQvYskWKR4ePo4n8eUEcRPMmmkOhV3YxDQdtP4yLMREWY7Rfw_uaEi4cvoR6B3YIerbnywrWkybCeQyYgNO6GM1IEDxj0oHg5nCBeCEMpxDBExDyBrHEWTNjgpvT_DjgPEwxAd8tmPRiwdNOyIOQP-_rB2K-fYohxJtfzoCfer4EFNXjhGjl48nb62ma9Wn2n6epUnCtt7uv5bbKz1pL-fqDeDkRhg2oedvsZX6bw8Nxcv7lk0-fqN7AGCX3UtYgq8lOkyyhHjuZ0X9F6Q9M-Kzi5BMxEJq42G85A7l4W8DElNBw-AJNIFr5oNxm1uPKGYKdT6_YlZCy2fmzA6fDBHHKhkdLQKjuDjV2d6ge_EKM2u7gN88OE4yR3RMxc1mDzZTunNcQoFKj5xfmE_Abv9xJfOYAZbsFZELamJjs1jyO_7V-B4UdKttXvS5wKNt9pbpS7rvCDe20n6ayR2PLum4rrcupNc04jnVVo6xM4QclVSVL2ZdtuW-6XWV1q21nprYeu6ptRC1x1j7sQrjOu5jOhSdacWj6ru-LoEcMlBWg1II3yE6h1CaINGwxP8b1TKKWwRPTC4U9hyydn38efv_r720grCfSWRBbgv8fv5tn95KGzi0nDLm0BH551srEhVgvXKwpDI75QtvkqaNQx7Nnt447E2ehjhuPx-fHJcV_0LBQx8yehDrm7P4NAAD__2ySPqU">