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

    <tr>
        <th>Summary</th>
        <td>
            Miscompilation of rustc-produced IR since 01859da84bad95fd51d6a03b08b60c660e642a4f
        </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>
    Compiling Firefox with cross language LTO + PGO (note: I haven't tried without PGO) produces a crashy Firefox on all platforms. I bisected this down to 01859da84bad95fd51d6a03b08b60c660e642a4f, and reverting that commit from current trunk fixes the issue.

Reproducer (sorry, it's massive, I haven't reduced it yet because I'm also in the middle of tracking down separate problems with non-trunk clang): https://drive.google.com/file/d/12s6DsTnMWIPuMikVRYTMPklyj-OeXH6f/view?usp=sharing
Instructions (run on x86-64 Linux):
- Unpack testcase.tar.xz
- `cd testcase`
- run the command in the `build` file
- run the command in the `crash` file (requires an X11 server ; without an X11, there's a different, unrelated crash)

In case this helps, this is a pernosco session with the crash: https://pernos.co/debug/Twdl8_V2QanMUEn2lEG0qg/index.html

Cc: @pcwalton, @nikic 
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyNVEtz2zYQ_jXUZUccEKQo6sBDbEepZqKJ63HS9NQBiaWICAQUANSjv74L0nbd6aEdPUBigd3vsUBj5a2-t8NJaWUOsFUOO3uFiwo9tM56D1qYwygOCJ-fv0DC7-DxUxwrYwMm-QfYQS_OaBK-DhCcQjlttmOICxO-gZOzcmzRg6CMwve3tyrWgNAaTlqEzrrBp5SsUR7bQFlCrzxIezEQLLCsWm2kqIpGyM2qk6tMloLlDauakrVlybAsuCi6hN-DMBIcntGFyCj0IkBrh0EF6JwdoB2dQxOxjuYInboSstAjKO9HTBP2kLAP8_8TvkB3ka-3zt1ifhWIq4dBeK_OGG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