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

    <tr>
        <th>Summary</th>
        <td>
            [ConstraintElim] `Y -nsw X s> NonNeg` implies `Y s> X`
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            llvm:optimizations,
            missed-optimization
      </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/H7v8VG
```
define i1 @src(i32 %x, i32 %y, i32 range(i32 0, -2147483648) %z) {
entry:
  %sub = sub nsw i32 %y, %x
  %cond = icmp sgt i32 %sub, %z
  call void @llvm.assume(i1 %cond)
  %ret = icmp slt i32 %x, %y
  ret i1 %ret
}

define i1 @tgt(i32 %x, i32 %y, i32 %z) {
entry:
  ret i1 true
}
```
See https://github.com/dtcxzyw/llvm-tools/issues/57

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyEU09voz4Q_TTDxUpkj_mXAwfalN_v1MtKq-7RwIR4ZXCETdrk06_skjbbQ1dC2Jp5vJl581DO6WEiqiB7AMTed2_XyysgQrZP1OKPdq7WYNLa_lLVRp8JQdbs6P3JgawBG8BGxfjWmPO4tfMA2HQE2FwBm_-Lc_nzP-A15Hx9eN3TQU_EtGCQcjd3gKWWyACzN8BHtt4vt_uspoFWDA_BDYq0SEuZpyXgLmCv8SwegNc0-fkSWuM1Cym3tAzknoVzcq9_sceKK66zUx-BuhtPzA3-hnRLu2KvEdspY9jZ6j50H2dWzi1j7FDcmAB3N-KZ_B2v-eB9W1kvERhQ75_P5INexT68v4jlB_8Psb4RYy3h54U-C9yt5QfRl8UO2h-XdtvZEbD58EcTht54a40DbLRzC4VLVgCvk76S_U7uVEKVKKTkOUcsk2NVpFSQSluh-C7viIs2R9V1aYqYH3rZJbpCjqlALoSUBS-3spA95pRJSsUh6w6QchqVNh8-S2LpSogShUiMasm41csBArK2J69HfVVe28kFY-MjII7aOeo398nV9HMVR2uXwYXdaufdZzWvvYn_yqOdnJ-VnvyT0SNkewY5_8U2wV0vzIF8Ys92eqYBcs70eDKa3Dsk5l4g58kym-obrWP_q9Cn2f6mzt9LvY58rvBPAAAA___DnRdf">