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

    <tr>
        <th>Summary</th>
        <td>
            while loop miscompilation, likely due to invalid assumption
        </td>
    </tr>

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

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

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

<pre>
    If x is greater than 0xfffffff5, then this should result in an infinite loop, due to integer overflow. In reality, clang compiles this to a simple `ret`.

```c
#include <stdint.h>

void loopGoBrrrr(uint32_t x) {
    uint32_t i = x;
    while (i <= x) {
 i += 10;
    }
}
```

Godbolt: (comparing GCC and Clang)
https://godbolt.org/z/ojWsxhcqE
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxcUk2P6ygQ_DXtS2siAv6IDz7kYzya6172uCKmY_cshizgTGZ__RPxzIv0LGTLVFVT3ZSOkUdH1EF1gOpU6CVNPnR_UQr-RDdZ1cXZm6_u_YJ35IhjIJ0oYJq0Q3G_rE8F8ohpIodp4ohx8os1GCguNiE71A7ZXdhxIrTeXzPdLITJI7tEIwX0NwoX6z83-O4wkLacvjJtsNqNOPj5ypbiWj951Bh5vlpCqEWgBLXYgNjnVYt1DflHKnaDXQwhqGNMhl3aTKBeV-7Ns3n4efOHEEIAuVvYJSX_SXgH2SI0BxB7RMTf-4ygTngH9YN8TpxtyF1Gjiv4lDKCPOTNrXhKoDllA-v7x-9q6c2bs7cJ1D6XzG3rwG7Et-MRtTN4zOMA2YLYTyldI6g9yB5kP67CjQ8jyP5_kL3_-Dvep-G_18J0yrSq1QV126Zst3VdiqqYulq3F1NvxaBItrumpUbrSldDNRjRtMOu4E4KWYlaVFIpJatNPZx3alcqU5qh2coLlIJmzXZj7W3OZxcc40LdtlSirAurz2TjI1tSOvrEBwpS5qiFLotezssYoRSWY4rPMomTpW6dbb4hnDmuIdCJvcvJsPwv2a9njm7askEd4zJfM6dYgu3-GBKnaTlvBj-D7PNZ35-Xa_AfNCSQ_cNhBNl_t3Dr5K8AAAD__9cF-YE">