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

    <tr>
        <th>Summary</th>
        <td>
            Increasing undefinedness during simplification `and` and `xor`
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    Alive2 report: https://alive2.llvm.org/ce/z/LhcvsB

```llvm
----------------------------------------
define i4 @c_0_1_0.2(i4 %x, i4 %y, i4 %m) {
#0:
  %im = xor i4 %m, 15
  %n0 = xor i4 %x, %y
  %n1 = and i4 %n0, %im
  %r = xor i4 %n1, %x
  ret i4 %r
}
=>
define i4 @c_0_1_0.2(i4 %x, i4 %y, i4 %m) {
#0:
 %n0 = xor i4 %x, %y
  %#1 = and i4 %n0, %m
  %r = xor i4 %#1, %y
 ret i4 %r
}
Transformation doesn't verify!

ERROR: Target's return value is more undefined

Example:
i4 %x = #x0 (0)
i4 %y = undef
i4 %m = #xf (15, -1)

Source:
i4 %im = #x0 (0)
i4 %n0 = #x0 (0)        [based on undef value]
i4 %n1 = #x0 (0)
i4 %r = #x0 (0)

Target:
i4 %n0 = #xf (15, -1)
i4 %#1 = #xf (15, -1)
i4 %r = #xf (15, -1)
Source value: #x0 (0)
Target value: #xf (15, -1)

Summary:
  0 correct transformations
  1 incorrect transformations
  0 failed-to-prove transformations
  0 Alive2 errors
```

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy0VU1v8jgQ_jWTiwWyx_k85EBf3kgrrbRSt_fKSRxwldjIdljYX7_KRyGgQntZhBLH88z4ecb2jHBO7bSUOUQvEG0D0fu9sXlp9O6j1x9BaepzvmnVUSKx8mCsB74he-8PDvgGsAAsxGhet-2xWxu7AywqCVj8C1j8ua-O7gXoFuhmfsZ0-g_waWr1w9-ErmWjtCQqJBDS6p2-s3e6RsB0mMHoBPiLTMPzddgBZgSSTybI6cB-_CCDXXUE-JacjL06_CIsWkA0vYOMK43LLEBsBAldzyBNZ5TqFjB7F0qzGXX6BFnpZ5udOSfbecC3wH__T7n4qU5A_lDpM6GD3124x0rfrNCuMbYTXhlNaiOdBkw8OUqrmjMgWx6s36-vf70Oh_NN2J30gIkbYvdWk6Noe0mUI52xkvR6Slt9430S3aGVl0zM0kf6gPxECWBKAbOl-Tyax3jL6e7i1QxeLBoUr9jFeXr-bXpb3S-ouucrzptzZ88geimFkzUxeqIzSYZoe-PMnge3j8zzdkx5vSW8IPS12Ou-_whov0FNWZvl8c1XbCeet5CnG9F3nbDnRUGgpDLWysoTf3ME3SeAEaW_gVDSCNXKeuXN6mDNUT4GzuVVWmusu6uS02dQ57zOeCYCmbMEsyRmSZwF-zzlaZpR2tAmCnmFYVnGKY04S-Kk5E2aBSpHiiGjGNIMMczWUcgwKmuaZmEVNxwhpLITqr2U70A518ucMR7xOGhFKVs3dgdELf8hoxUQh2Zh88FpVfY7ByFtlfPuGsYr38r8D11ZKZzSu-u909I5Uvd2mHSqO7SqUdV0xyGmQtcQ07GwQExPxkJMg962-W3T2Sm_78t1ZTrAYuwl02tI9oesPGAxUnWAxazlmON_AQAA__-mG9Yh">