<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/62035>62035</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[AMDGPU][GlobalISel]selectImpl() may create illegal copy from VGPR to SGPR
</td>
</tr>
<tr>
<th>Labels</th>
<td>
backend:AMDGPU,
globalisel
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
chenzheng1030
</td>
</tr>
</table>
<pre>
This is found during investigation of issue https://github.com/llvm/llvm-project/issues/61468
After importing more td patterns to global `MatchTable`, for example the patterns in https://reviews.llvm.org/D147780, `selectImpl()` will create illegal copy.
For now in https://reviews.llvm.org/D147780, this issue is workaround by not using `selectImpl()` to do the selection. But maybe a fix in `selectImpl()` should be made to avoid such issue.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJykk09vpDgQxT9NcSktMuZPw4FDJ4hWDpGiJLt3gwvwxtjINt3p_fQr6JnJKJocRnMByVa9evXzK-G9Gg1RDfkd5E0k1jBZV_cTmf8mMmPCUhZ1Vl7r10l5VB4HuxqJcnXKjKjMmXxQowjKGrQDKu9XwimExUN6BN4Cb0cVprWLezsDb7U-f__9tTj7L_UBeLuXeeBtkWRFCawBdrx9j0Mgh2perAtbx9k6wiBxESGQMx6DxVHbTmiEgj2K0E-votMEBQN-j4N1SO9iXjRhmOijTJlPLh2dFV18vDmLrRuBt02SHQ7lrgMF86SpDw_zooGXwCsoGF6U1tg7EoFQaU2j0Njb5Rr_PEJrHRp7-d2W4QZ846k8Xqx7E25n313R2ICr33h8YSxYlHaf-HarrInxbg04i2tHKHBQ75uhL8r9ZFctsSOchaRNTZytkujXfrp5iiNZp7JKKxFRnRRlwipeJFk01QnLi6ErBiopzWTV86xKMn7osyQ7lKI6RKrmjKcsSxjjCUuyWMiqYjKRmWBcpGUFGaNZKP0DTLS3rAvO0jzSoiPt98By3on-jYyE9Hh8bE5PfwPnwO-B81smlCe9HeVN5Oo9c906esiYVj58gI-CCnrfgW8qeQP53WmXeHghDXnzmdIG8lcvj4OzM_5zenreqL2cnp6j1en6DzZiG_r_AAAA__9hbizq">