<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/114691>114691</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[llvm-exegesis] Machine code verification error when setting ymm16 on non-avx512 system
</td>
</tr>
<tr>
<th>Labels</th>
<td>
tools:llvm-exegesis
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
boomanaiden154
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
boomanaiden154
</td>
</tr>
</table>
<pre>
Currently when trying to run llvm-exegesis and setting a register like ymm16 (a 128-bit/256-bit register only available through the AVX512 extensions), we get a machine code verification error when setting one of those registers:
```
# End machine code for function foo.
*** Bad machine code: Illegal physical register for instruction ***
- function: foo
- basic block: %bb.0 (0x7f8f3c5fe258)
- instruction: $ymm16 = VMOVDQUYrm $rsp, 1, $noreg, 0, $noreg
- operand 0: $ymm16
$ymm16 is not a VR256 register.
LLVM ERROR: Found 1 machine code errors.
```
We should probably just unconditionally use the SSE/AVX instructions for the lower registers and only use the AVX512 instructions for the upper registers.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUVE2PozgQ_TXmUkqEzUfgwCEz6UgrTWu0Pdrs7NFAAZ4xrsg26ebfr0zopCP1ZSRESNnvlf3qVUnnVG8QK5Z9YULURKM0UrVoeJYyIVh2iOTkB7LV41pUUztXXydr0Xg9w-uABrydlenBE9jJgNaXcYNv2KNTDqRpwaH3YYMEi71yHi1o9RthHkeeAxOFBC6KTa08E0eR5eHrvpWMnkFepNKy1gh-sDT1A_gBYX_6mXEB-ObROEXGMVEy8RVeEXr0IGGUzaAMQkMtwgWt6lQjvSIDaC3Z6_Hfj0cGgTrwAzm8pXcs2bP4wOI9y-P1uf4VCTyZ9jFFRxa6yTRLio5ou-5dEesDX-QjjiV7-Etr7KWG8zA71Uh9FyCQKuO8na68N54r7eaWMdB0RO_hWjrVQK2p-R1WmMjqehtDEDx-23VFlzRZhyIrgmor5kOeKyZdi5Qc4PT8_XT4-5__7Bji1p2D1Dy8mEgNWezDd_wQWGnpjDY4IQ6kcKN912VNohwYCmU7vYgsvwmwivjt2-kZnl5evr8EkiNNpgX-KP9SVLf9vF7L-18EN9CkWzhbqmWtZ_g1OQ-Taci0Ktxbaj3D5HBx2I8fT0wc96efH5VxS0nCsqZXtHevLG5f_PqOXx36KXg6nz-Ct1FbJW2ZlDLCiu-SOI_jsiiiodoVuzbnOdYodrxL05q3ssi7RnZlkZStjFQlYpFyHiexEGVabHnSlTzmXbErG76rdyyNcZRKb0Nzbsn2kXJuworzNC95pGWN2q3DwBPp4PqHPl5ngq2WaD31jqWxVs67O6VXXi8T5RGZHeD5T9rw6gUyYMhs5OUt6Odm53GMJqurwfvz0pTiyMSxV36Y6m1DIxPHkHf92Zwt_cImDJTlpo6J43rZSyX-DwAA__9KJ5u9">