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

    <tr>
        <th>Summary</th>
        <td>
            OpenMP emits assume of compare of globals to null
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            openmp,
            backend:AMDGPU,
            llvm:optimizations
      </td>
    </tr>

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

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

<pre>
    I see some optimized IR that has this assume in it:

`  tail call void @llvm.assume(i1 icmp ne (ptr addrspacecast (ptr addrspace(4) @.str.2.29 to ptr), ptr null))`

This is trivially true since it's a nonweak global reference, and the assume should have been optimized out somewhere.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxkUs1unDAQfhpzGQXBAAscOGyz2iqHqFHVPsCAZxc3xkYes1H69JVJk0bqBcb-5JnvZ0jEXB3zoJovqjlltMXZh4GCsFuy0evX4QGEGcQvDH6NZjG_WcPDd4gzRZhJIM5GgES2hcE4MFFVR1WcVPH-PRQAkYyFiayFmzcaVF1Ye1vyt2cKO1OCmZYVHIPCbo0BSOsgK008kcT_LhV2tcI-Ncolhhxz7CF6WGNQ2Cu8TxW4zdr92KtD8ZnTj8TZCMRgboasfYUYNgYxbuKkAFsBAufdC9MzXK0fyULgCwd2afg9kNMQZ34XLrPfrIaZbgwjs_vkld_ibt_LzIHzTA-V7queMh7KQ4t13zdNm81D19JF11pzgwfCtuOSK-ywJGrLqaqnzAxYIJZYlWVTYtXmpb4cyrIa667pLjiOqi54IWPz3VofrpkR2Xho-vbQZpZGtrIHjehXdsuqEBXeK8SRpmd2WlXH4-Pp69PPDyB1UtXxrxiKxjtJYHPKwpDAu3G7SkrTSJR_g6OJlodvK7vHJ-DFxI8N8ReY_LJS2Ms3ZyUll7LKtmCHOcZV0g7hWeH5auK8jfnkF4Xnnc7b724N_hdPUeF5VykKz7vQPwEAAP__e-3pgA">