<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/141655>141655</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
analyzeCompare needs a way to report subregister uses
</td>
</tr>
<tr>
<th>Labels</th>
<td>
llvm:codegen
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
arsenm
</td>
</tr>
</table>
<pre>
[analyzeCompare](https://github.com/llvm/llvm-project/blob/a9b64bb3180dab6d28bf800a641f9a9ad54d2c0c/llvm/include/llvm/CodeGen/TargetInstrInfo.h#L1777)'s interface is broken because it does not provide a way to report used subregister indexes in the instruction. If there is a subregister use, it's unsafe to return true and you must skip the instruction (e.g. #141654).
This should probably change the reported Register inputs to RegSubRegPair
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyUkktu3DgQhk9DbQojSNSTCy16bPTAwCwGHl-gSFZLjNWkwCKddE4fSE7QsLPKSkAJ_B_4P2R2syeaRPe36B4LzGkJccLI5K-FDva2_0GP6-07PYTrhpFE9yjkuKS0sWhOQp6FPM8uLVmXJlyFPK_r26_PX1sMX8gkIc96DVrIMyrdt1o39VhZ1L2Vo76MVYV9W18UKrRda6WpzF3HebNmS_fDQ7D0D3khzy8YZ0pPnlN88pdQLkI2_9bDMAiphBwYnE8UL2gIHIOO4ZU8aDKYmcAlsIEYfEiwxfDmLAHCV7xBChBpCzFBZrLAWUeaHSeK4Lylb7QLQ1oI3G6dTXLBl_B02W_x8MIPrzKTkA_g0hEqe8YLvbukHD2kmAnQW7iFDNfMCfjVbZ8NQMiRyrkEIZu6rfuuFVKVojqJ6vSyOAZeQl7t3kWjXm9gFvQzHTLvdcjC873IlhPvIZ5p_j_rZ5r_QxehsFNjVaOwoKke2rEZ6r7qimXCflQKLUplGlOrfmzloPtO2cEMjVF14SZZya7q5FCPbd92pRlaNSqj1aUZW2q0aCu6olvLfccyxLlwzJmmo0xXrKhp5YNEKY-pm5MJluZ9arnTGaeDKZ1nFm21Ok5810ourTR9RBU8keXfVv00DRc5rtMfA32EZyHPP_O_TfJHAAAA__8wpRnk">