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

    <tr>
        <th>Summary</th>
        <td>
            [PowerPC] fatal error: error in backend: failed to perform tail call elimination on a call site marked musttail
        </td>
    </tr>

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

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

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

<pre>
    FreeBSD 13.2-RELEASE
LLVM from devel/llvm-devel, version 17.0.d20230522,
powerpc, powerpc64, powerpc64le

Reproducer:
```
void name(int *params, int *program, int r, int g, int b, int a) {
  auto fn = (void (*)(int *, int *, int, int, int, int))1;
  [[clang::musttail]] return fn(params, program, r, g, b, a);
}
```

Compile with:
`clang++-devel -cc1 -triple powerpc64le-portbld-freebsd13.2 -emit-obj SkOpts-735c83.cpp`

Output:
`fatal error: error in backend: failed to perform tail call elimination on a call site marked musttail`

This causes Firefox 114 to fail to build.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy8VE1v8ygQ_jX4MrJlwPHHwYd8NKeuWrWrvWMYJzTYWIDT3X-_wk7adLXv9ZUsM4xgnnnmmUF4r08jYks2O7I5JGIOZ-va6TJ34iPprPqnPTrE3fsBKM9Y-vb0_LR9fyL5geTb5-e__oDe2QEUXtEQdjTmOqS3zR6u6Ly2I9AqyzPFcsbzDWOE7dfrk_1EN8l48maWxY-NwfXg-n_DyVk1S3SE31ykzG_fsr1arWAUAxJW6zEAYdtJODH4GPXucPbkxHD3uLtxuhvd3RCENUCq3RobQMzBQj8C4QcgrF7ACKsJ2xLWfCM-YN3MXywNYQ0l_Cv-osBOGjGeIkG-HWYfgtCGbA5kcwCHYXYj9CNh9TetBz4Ll4XHwiHm_xWeVIf_Ldn639th0gbhU4fzY3HXZNiOsN2qKqRSUkiD05PBR6HSybrQGZX2DrHzKjYLpDjokNruA94vL1PwacU3suaZnKb_JPAyh2kOj9C9CMIAOmej3KsBeoROyAuOKvp6oQ0qCBYmdL11A8RqgRTGABo96FGE2H52BLF6vQ4Ig3AXVPBV3Z-Z_HnWHqSYPXo4aoe9_RsoLSJKxItrN2ujskS1XDW8EQm2tKxLThvOi-TcbmSHsqJljxWtBM9LVtaNEFirnBY1VYlul1Eo84YWOaM8E4iiVqqvaCN7lB0pchyENlkcp8y6U6K9n7EtOaNFYkSHxt8H1rXLzHXzyZMiN9oH_30t6GCW0X6NSr3uYxv9tsImszPtOYTJR13ZkbDjSYfz3GXSDre34v5kTM5-oAyEHRemnrDjQvbfAAAA___mfWoU">