<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/121428>121428</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [InstCombine] `noundef` attribute should be dropped
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            miscompilation,
            llvm:instcombine
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
            dtcxzyw
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          dtcxzyw
      </td>
    </tr>
</table>

<pre>
    Alive2: https://alive2.llvm.org/ce/z/wKsUWK
```
define i32 @src(i32 noundef %x) {
 %ct = call noundef i32 @llvm.cttz.i32(i32 %x, i1 false)
  %cmp = icmp ne i32 %x, 0
  %res = select i1 %cmp, i32 %ct, i32 123
  ret i32 %res
}
define i32 @tgt(i32 noundef %x) {
  %ct = call noundef range(i32 0, 33) i32 @llvm.cttz.i32(i32 %x, i1 true)
  %cmp.not = icmp eq i32 %x, 0
 %res = select i1 %cmp.not, i32 123, i32 %ct
  ret i32 %res
}
```

</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyMU82OozwQfJrmYk1k2oGEAwdmIqRPc_60Zxs3iVcGsnYzf0-_MiHzs6ONVkIC213VrqJax-iOI1ENxT0gWu5e3l6fARGKQ6ZnPk2hXjczM9nXuvHuiRBUI07M5wiqAWwBW73sb7x_GjZTOAK2HQG2b4Dt82P8_8cjyAZKuT6ysdS7kYRTKGArY-gA92kxTvNoqReAxQtgJWB3D7JJy44FqIPotPfvVSt86doxv22cwpXoQvAgXC567SMBVoloYRrOC5VLH9dLrOXyWhQoLkWRPHWcaC7IhfMC6Pi6yFEtuEB8PQwUk-Td4ZtYPvJtsX9TG_R4pBUqU2ulEurfTOAw_-HBZpz4wwf69d2HGzYk8Gf1X1y5YcXnDGS2VrZSlc6ozneq2KEqd_vsVJdVrnOrtianEvdd2VfWlCXlPZq8L0yRuRolFjKXuaxwV-w3e2Op6qtCYaUrU1jYShq08--BzFyMM9U55lvcZ14b8nEN_eBiNw1n5zW7aUzZxwdATEhQjRsjd9Ng3EjrWIQ6Hd2Z-RiT7S5y_GjDjv0yTf-NkR9WXHEQUMr1N0IphWYOzsxMIp6m2VthSNgwnc9kszn4-utsHR2fZrPppgGwXa51ed2dw_STUgrbRV0EbFeBTzX-DgAA__9YnB5J">