<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/126781>126781</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[AMDGPU] getSubRegs in SIRegisterInfo.td can be simplified
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
jurahul
</td>
</tr>
</table>
<pre>
It seems the code is essentially slicing a large list using conditions, can be simplified to an assert (for size check) and a list slice, using the `ret32` list and size.
Simple starter task for someone interested in TD files. Verify that the generated GenRegInfo file is the same before/after the fix.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxkkkFv3CwQhn8NvoxiYVh77YMP-30rRzlUqpK2d2wPNgmGFTOOuv31FU6qHnpCgof3GWYwRG4JiL2o_xP1tTA7rzH1r3sy6-6LMc73_omBEDcCXhGmOCM4AiTCwM54fwfybnJhAQPepAXBO2LYKW9NMcyOXQwk1P8wmQAjArnt5p11OANHMAEMESYGoVobE5D7hTCtOL0J1YEJcw7OkdmDOecjO5cjGpmQtRKN_GAyngNKEPIi5OUluxCITWJMwIbe4JDEDWNAcIExITHO4AJ8u4J1HqmEH5icvQOvhg_RggGTydgjhmdcnoKNB5ubkQEyG8KINiYUajD2sK0I1v0si7nXc6c7U2BfnXWnpdRSFWtvm-asxpOeT1JVVWXPtVatVMpK22rTtoXrlVT1cdjWrapKPHft3Oh67DrdjLYTJ4mbcb70_n0rY1oKR7RjX6nm3FaFNyN6-jPd1GfqYdwXEieZ-0V_77Fjf_yDy5fr49fvor7Cgvyyj8-4UG7Oy9MzLo4YU358yfO_8yz25PuV-UZCX4QahBoWx-s-llPchBqy7HN5uKX4ihMLNRwVk1DDZ9HvvfodAAD__x6v3D8">