<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/59876>59876</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
@llvm.smul.with.overflow.i1 is special
</td>
</tr>
<tr>
<th>Labels</th>
<td>
miscompilation,
llvm:optimizations,
llvm:instcombine
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
regehr
</td>
</tr>
</table>
<pre>
https://alive2.llvm.org/ce/z/VCcohD
InstCombine is folding the overflow output of `@llvm.smul.with.overflow(x,1)` to false, but this doesn't work for i1 where 1 means -1.
if we want to salvage an optimization for this case we can optimize `@llvm.smul.with.overflow.i1(x,1)` to x:
https://alive2.llvm.org/ce/z/3BdrRX
cc @nunoplopes
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMks2OnDoQhZ-m2JQGmaKBZsFipltId3sXUbbGFODEYESZZjJPH0Ermc5EGmVjL-rH3zk-WsT2E3MF2Qtk10ivYfBLtXDPwxI1vv1RDSHMAukzUA1Ua2dvTLFztzH2Sw9UGwaq34DqLxfjhyuoK6jn-_nfJOHix8ZOjFaw8661U49hYPQ3XjrnN_RrmNeAvkPIFZzUsVnG1cWbDUP8qw_o_Ap0SYBKyBUGj512wkAXbNaAYbCCrWeZgIqAm1--Y-cXtAluAy-MCY6sJ8GnJMZHRNvhxrjpKew7Rbub7hn1hH4OdrRvOlg_HauOJ4wW3gfMewd_Dh7b5G_2193PB4p_9jh9aZf_vz6OGoNwUtM6-dn5meUPdVFbpW2ZljriKsmLNKHyfFLRUDVdYXJOlS6pTPKyLIqm7ahMOSvKMxmKbEWKUpWogigpSMUq5fNJZ2et8lOWJ7tiHrV1vzEjK7JylZXnIo-cbtjJkSqi0Yrx42zdYSYQAV2AaB-E9PnRaPlYtJMEc0_QXsqu0VLtpadm7WU33UqQd4Rgg-Pq08_YgygzG6tdtC7uQ7x7G4a1iY0fgeqD4X49zYv_xiYA1YdMAaoPpT8DAAD__1JrB2E">