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

    <tr>
        <th>Summary</th>
        <td>
            Bounds check is not eliminated `ssize` vs `size`
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

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

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

<pre>
    ```cpp
#define _GLIBCXX_ASSERTIONS
#include <vector>

void foo(std::vector<double> &vec)
{
   auto count = ssize(vec);
   for (decltype(count) i = 0; i < count; ++i)
     vec[i] += 1;
}
```
`-mllvm -enable-constraint-elimination` does not help.
With `size` instead of `ssize` bounds check is eliminated.
https://godbolt.org/z/f5Gn9eKrc
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxcUt1umzAUfprDjZXI2OHHF1yEpFRVp01aJ613lbEPwZ1jR9hEap9-gpBkK0JwbH8_53yyDMEcHGIFWQ3ZPpFj7P1QPft3b_Ejab3-qCCnl1edTkD3QLfAuMbOOCRvj9-e6t3r69v25eXh56-nH99fbhDjlB01EuC7M6roB-APy-H8PXujSec9sDJEDXwLfHsF7rQfW4vAHwiw_IwKmFi4RX0pCCFyjJ4oP7pIgO9JCOYTgZULnN-BnR8IsFKjsvHjNGFmFjBBzEylwOu53F30piWwGlhtbs5keibtrDaQ7edzvifpzQiK_VJcE7stV0drz0eyQidbiyvlXYiDNC6u0JqjcTIa7yCnRHsMxPlIerSn9YX_28SeQE7n8XJKjAsRpSa-m3ev260fnQ5E9aj-EBPIVRn1otPHeApTzqwB1hy8br2Naz8cgDWfwJoue3QCnweV6IprwYVMsErzMhOCs6JM-oqjzDMm841QckN52omCFzlSpF3ZdjxNTMUo4zSnWSpYkZVrkYoCs7ZoVSlUoQRsKB6lsespj8k7MSGMWOU8ZXliZYs2XC_jUE2gVTseAmyoNSGGOy2aaLGqv8w8JXef-794zuGfDJNxsNWXPEzsx3at_BFYM9ksv9Vp8O-oIrBmbjUAa-Zu_wYAAP__BHn29A">