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

    <tr>
        <th>Summary</th>
        <td>
            wrong overflow flag in correlated propagation
        </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/d3WhhS

```llvm
----------------------------------------
define i32 @and_sel_op0.2(i1 %b) {
#0:
  %s = select i1 %b, i32 25, i32 undef
  %#2 = mul i32 %s, 65535
  %#3 = select i1 %b, i32 %s, i32 %#2
  ret i32 %#3
}
=>
define i32 @and_sel_op0.2(i1 %b) {
#0:
  %s = select i1 %b, i32 25, i32 undef
  %#2 = mul nsw nuw i32 %s, 65535
  %#3 = select i1 %b, i32 %s, i32 %#2
  ret i32 %#3
}
Transformation doesn't verify!

ERROR: Target is more poisonous than source

Example:
i1 %b = #x0 (0)

Source:
i32 %s = #x00000000 (0) [based on undef value]
i32 %#2 = #x00000000 (0)
i32 %#3 = #x00000000 (0)

Target:
i32 %s = #x10806000 (276848640)
i32 %#2 = poison
i32 %#3 = poison
Source value: #x00000000 (0)
Target value: poison

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/eJzMVU2P4jgQ_TWVi9XIKefzkAO9DNeVekba48hJKsEtx45sB6b316_yAQ2rnum97UQIjP3eq-dHqZDeq94QVZA-Q3qI5BRO1lW1Nf3rZF6j2rZvFfAD8P1eqzMhczRaF0Ds2SmE0YPYAx4Bj3I53ml9HnbW9YDHhgCPfwMeW_HX6fR1VdneM76-Zvi69fQfnxXdUqcMMSWQQcKlab970t_tyHcIWKiYAaY1YMkgf95KouCz2eULm889A3FgnjQ1gd0ofyyimF5Xk2mpu2MBzjXFgQ2TXutj6mdwlqYifQSKX1S40rb1LHslOwp322Lznx-2hTiA-PJbxWD8hZnp8r_E8c1J4zvrBhmUNay15A1gHtiZnOreAOP7xvvy8vLny9y836TrZ13PBuuIjVZ5a-zkWThJw7ydXEMPxB9yGDXdotvsLzcCFD84Ayw4YHlP-rrK3DjbPd9J2_POLSF9rqWnllmzZs7OUk8E6eFB4xb_xzKPSPEJcgtySeTnZmNe8GzjYp4VSZElH1Vbfa2Bfuzk_myNaLuk2P_C5faL3ZD3KpvWNAzSvd21N2eNdW5ut_DQJv4KiJkyn0A466TS1D4F-zQ6e6afA7cRSc5Z5_816aK2Em0pShlRFeeC51mRIo9OVZ0WeZt0nRQ572rOk4ZnZd6WIhaSeNZGqkKOSRzzlMccOd9JnndpQXmTFUXZJggJp0EqfRu-kfJ-oiqOk5KLSMuatF8mPKKhC1tOAXEe-K6aSU_11HtIuFY--HeZoIKm6uKs6Zk9k-u0vbBOy54psyarZaCWjc6Osl_SiCanq8d_hl6F01TvGjsAHpeBv37Mab5SEwCPiyMPeNwsnyv8JwAA__9ZH8eg">