<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/64565>64565</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
GlobalISelEmitter misses dead flags on scalar zext pattern
</td>
</tr>
<tr>
<th>Labels</th>
<td>
backend:AMDGPU,
globalisel
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
Pierre-vh
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
arsenm
</td>
</tr>
</table>
<pre>
This testcase doesn't set the dead flag on the implicit-def $scc
```
# llc -run-pass=instruction-select -mtriple=amdgcn-amd-amdpal -mcpu=fiji < %s
---
name: s_zext_s16_to_s32
legalized: true
regBankSelected: true
tracksRegLiveness: true
body: |
bb.0:
liveins: $sgpr0, $sgpr1, $sgpr2
%0:sgpr(s32) = COPY $sgpr0
%1:sgpr(s16) = G_TRUNC %0
%2:sgpr(s32) = G_ZEXT %1
$sgpr0 = COPY %2
SI_RETURN_TO_EPILOG implicit $sgpr0
...
```
This pattern appears in the test failures with the patch for #63986 is applied
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxsU02PozgQ_TXmYoHABhIOHHrypZZmp6N0WtrdCzKmAE-bD7lMdnd-_cqQTNBoEBi76tVzVemVQFRND5CT5Ath7KzAGPBvLWGMJHtPTLYdTC4MQt955VD9l19bhdQCWikQaDUA9oRtLEWw1LZAKxAVrbVo6NDPBtWNWkll_QpqSliMUpJwT8KX-5qG93c5Mk61ltQ3U--PApHwverRmklaNfQ-ggZpqd9Zo0YNhO9FVzWy90VXuW8UmvqdHCfC97X6rijhO0pYggu97_vLphcdEP5CVw8WP-BfW2CUFnYokLMFqaERWv2AysGtmWAxG2i-iP7zfc7nV6c1Qn7iBZqv6gY9uCrWbtdIZyGb3WKgtCyDkPCXx5FSrW6g-jnQNa0ZTUjY7rGPVnu2bqcLJSxxXM5H2NYVwjJK-J7u3s5_PdnW-GiFj9IH_lRcLx_fdgvhGs5-S38q_j78eV3oVujlunUCCXv631-Ly-H6cflWXN-Kw_n169vpp2R-yXVZgyD4rXJmYY7CWjA9FeMIwiBViwadXmktlJ4MIP1H2XY2j8LKltaDoYTxlGfblCp0sVpBtb7Tq3JeZTwTHuRRmkXJNuNx4rV5VdWbULINhDJx_ijlZZrWcRiKOo43kadyFjIebsMs4kkSJwFkdbyFjJWSVXUaVSQOoRNKB1rfumAwjacQJ8jTOEkTT4sSNN6nsxTyE3ontZc_9qfzhxtStiOMNXoohVYI-j63Jndsfjk1SOJQK7T45LfKashPc8zrO-hDp1zTaKcQAZ8DjG6CUQotDHWT8WiuNxmdt9aOTpyEHQk7Nsq2UxnIoSPs6C66__zRDN9BWsKOc1VI2HEu7P8AAAD__4J9U0g">