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

    <tr>
        <th>Summary</th>
        <td>
            LLVM 18 cannot read llvm-ir produced by rustc 1.72.1
        </td>
    </tr>

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

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

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

<pre>
    This is a regression from 625113402f9febd4d8c907a342ea09a3c0982ba8.

05b86a8fea23865e4a437efa9cb4f6844ccbf50e addressed a part of the regression. For instance, this:
```
  call void @llvm.dbg.value(metadata i64 or (i64 zext (i32 ptrtoint (ptr @anon.436463c58f189989edb51bc04335cb6d.21 to i32) to i64), i64 shl (i64 zext (i32 trunc (i64 lshr (i64 ptrtoint (ptr @anon.436463c58f189989edb51bc04335cb6d.21 to i64), i64 32) to i32) to i64), i64 32)), metadata !4453, metadata !DIExpression(DW_OP_LLVM_fragment, 64, 64)), !dbg !4493
```
used to cause an error but doesn't anymore with that fix.

What still causes an error, though, is e.g.:
```
 call void @llvm.dbg.value(metadata ptr inttoptr (i64 or (i64 zext (i32 ptrtoint (ptr @anon.202156da7d09c46fe0b29195d5b08186.240 to i32) to i64), i64 shl (i64 zext (i32 trunc (i64 lshr (i64 ptrtoint (ptr @anon.202156da7d09c46fe0b29195d5b08186.240 to i64), i64 32) to i32) to i64), i64 32)) to ptr), metadata !14853, metadata !DIExpression(DW_OP_LLVM_fragment, 0, 64)), !dbg !14944
```

from this object file: https://drive.google.com/file/d/17fb-_f363yRFibtkJjRQ5qihnAuOPbdc/view?usp=sharing

Cc: @nikic 
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy8lVtv3DYThn8N92ZggRxSB17owl_8CWiRImlQNJcGT5KYaMUtSfnQX19Qu3HiwgbSFCiw4PKgmXnF9xGpUvLT6lxP6v-R-uagtjyH2E-LWq3fjgcd7GP_2-wT-AQKopuiS8mHFcYYjtBgzRgXFEc5Om2F7YykreICnaJScUNlh1p1FaE3hF6fW1rrrlHd6BTyrqmdUIK3blTSaDE2nRDG6LGmDpS1pZqzoOCkYoYwQp7dNyoqGEIEv6asVuMIvoE8-0T4pRJp6OW3DwGMWha4C94CEXRZ7o6V1VN1p5bNEeyOLiursgLfCAgRCHal96d7yHufI5xyzMGv-_iUY0mj1rBWgjei4abuRtZJ2Ulndc20oYLz2ujGVsggB_AcCcq91wiCsiguJdK8vFQtx201XxaWND9J-rcynhX_qukVdfv0Zfy0RwSZEDX_-9zNT_9_OF3cIdjdfLx99_727dvff7kdo5qObs0loqQ_t1_yEmRWT-eskr9o31ZIyAGM2pIDtYKLMUTQWwYbXFoJthnU-ngM0cG9zzPkWWUY_cMz_D6WyZT9spwzpadUZ37CNs37mydw1VS9CtN3slTs8WvOYffpbN8_YwspsrqxqrVUGtGMjmqUTNa21rRjXVOhoP8FXN-t48foKiunHF_gjInuR0Gjr3PGhBTiRWvP7X7AleMEgv7kTAFpcYRfw5zzaT9jcCA42OjvXDWFMC2uMuFIcNgfxMESHFg76qvbkTf88cPgdf7886cPv9Z_-Hm93t6919YQHO68uyd82NKJ8Js0q-jX6Vshb0ypSgRd_Wdv4GB7biWX6uB61shGtLLmzWHuja2tGW07tkJQgaxuDTpN25ZJZoS2B98jRc4oralgXd1UEpEzrFuq2pbhaImg7qj8Uu04hzgdfEqb65sOO3ZYlHZL2m8KxNXdw75IEMvFEfsSc6W3KZXPwaecvmbJPi-uL-YA68CodQ0ZolMW9iAf4RSD3YyzoB8hbikbYFWLFTtscemfb_jk87zpy1aX-Mvf1SmG4hPBYReWCA678L8CAAD__3rfBRk">