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

    <tr>
        <th>Summary</th>
        <td>
            Missing workaround for old glibc `__PTR_ALIGN` macro
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang:codegen
      </td>
    </tr>

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

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

<pre>
    See also https://github.com/llvm/llvm-project/pull/130742#issuecomment-2835528395.

Do not set `inbounds` flag on GEPs for the following pattern:
```
((sizeof(long int) < sizeof(void *) ? (base) : (char *)0) +
 (((pointer) - (sizeof(long int) < sizeof(void *) ? (base) : (char *)0) +
 (align_mask)) &
    ~(align_mask)));
```
1. Handle the pointer addition case `(char *0) + idx`
2. Handle expr `((sizeof(long int) < sizeof(void *) ? (base) : (char *)0)` in `isUnderlyingBasePointerConstantNull`.

</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJy0U01v2zgQ_TWjCxGDGurzoIOcrLML7AbBtj0blDiW2dCkQVL5OvS3F5SVtCh66SHAAAL5BqM3j-_JEPRkiToot4Co4vj8-vIEiFDeZHKOR-e79TIbnHrpPhExaYJjxxjPAUQPuAPcTToe52EzuhPgzpjHt8_V2buvNEbA3Xk2BnCXC14XCCh0CDON7nQiG6-wEWWJjWjLDfAeeH_jmHWRBYoMKq7t4GarAlScHYycmLPs9q_7wA7Os3gkdnDGuCdtJ3aWMZK3iRnvoeJr8R6wAWyCfiV3AGyMsxPTNgK2DMQ1ewcenVYMsL8AOwbYDDLQ5din43iUfu3gyzVugS_Ipc5O20g-QVfsw_8pjZ7s_iTDA2B7gaoEMca-_QZOJba_aJNv2N_SKkOLmCt_JpXSUTvLRhkoPcNPPN5IMK2eLzPwfQY9n_3a_jHbJxtouxgjfLGKvHnRdtrKQPcX6tfOhihtvEueq3jyVKY6oVrRyoy6vC7KthA58uzYcXVAXh-atlJl09aqKJq6QJG3XPCK2iHTHXIseYFtXuXI-UYVoq5GrjjJksuGoOB0ktpskuM3zk_Z4u0uF3UjRGbkQCasCRuNtBOIfnSKJrJr0ny3hGWYpwAFNzrE8GNY1NFQ958OIfn7yfkH6VMaFvM7o9hk9DAmNfb7-8__7_t__7m9SxKd5OhdNnvT_XFYlwXCEtdlh8cOvwcAAP__DR47cQ">