<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/127486>127486</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
GlobalISel should have G_POISON
</td>
</tr>
<tr>
<th>Labels</th>
<td>
good first issue,
llvm:globalisel
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
arsenm
</td>
</tr>
</table>
<pre>
Currently GlobalISel has G_IMPLICIT_DEF, which acts like `undef`. This is used to lower both `poison` and `undef` from the IR. To mirror the semantics of the IR, we need a separate representation of poison. We should introduce G_POISON to enable better optimizations, particularly when legalization introduces padding vector elements.
This change would mostly be finding all the places G_IMPLICIT_DEF is handled, and equivalently handling G_POISON. We should then migrate vector widening and other transforms to introduce poison instead of undef.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxUk1Fv6zYMhX-N_EJcw5VjO3nwQ5cuRYBt92ItsMeCtmhLmyx5opyg-_WDlAzpngKEhzyHn2hkNrMj6kXzk2heCtyi9qHHwOSWYvDqsz9uIZCL9hNerR_Qnt_IgkaG14_zrz9-OR_P7x8vP5-EPMJVm1EDjpHBmr8IRFttTtEk2qqEd20YDMPGpCB6sP5KAQYfddKt3rB3oq0AnfraCFPwC0RNcP69hHcPiwnBh_wP04IumpHBT3dJjkHgiBQgMK0YMBIEWgMxuYjReJfkN8MS_iBg7TerwLgYvNpGgtePH9_Pb99_SzHJ4WAJBoqRAvg1msX8k6dw8loxRDNuFoP9hKsmB5ZmtHfJYybDikoZN8OFxugDkKWFXORSVM-ies50Ro1uJrjmOIvnBH0gmIzLnWht3nK1mAb-n39Cq9EpSyrlShTp781c0N4eL9fSlP-W-7p6TMEXM2dW94BXo8hlW6fAR00BYkDHkw8LJzIPXjeWYBxHQpXo5tcroVB9rQ71AQvqn7r60B2armoL3bd1fRi7ph3rDhvcD7u9bMbDbqymGttDXRWml5VsKvnUPcm6qdqSVLOb9rRvsaumbrcXu4oWNLa09rKUPsyFYd6of5Ldbt8WFgeynM9aytl7BZMJHCGLhJRCHoWUqVfUz3M-bMNkU6V5KUKfKt-GbWaxq6zhyA-faKKl_svHcIeo8fI4nWILttcxrizqZyFPQp5mE_U2lKNfhDxl59vPtzX4P2mMQp5yOhbydN_i0st_AwAA__9fYTv7">