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

    <tr>
        <th>Summary</th>
        <td>
            Incomplete/ill-defined branch alias and disassembly
        </td>
    </tr>

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

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

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

<pre>
    PowerPC branching instructions alias are incompletely/ill-defined in TableGen, which leads to a little imprecise disassembly.

E.g. the following disassembly should print the alias but doesn't:

```bash
echo "0x4c,0x83,0x04,0x20" | llvm-mc --disassemble --triple=ppc
        .text
        bcctr   4, 3

// It should be

        bfctr   un
// or
        bfctr   so
```

This happens because the TableGen files miss several branching alias.
Besides that, many branching alias are defined as real instructions.
I assume there is a reason why so?

In any case, I fixed this [here](https://github.com/capstone-engine/llvm-capstone/commit/c4efb40adeecea616afc12960bbc4024082e4658) for our [Capstone](https://github.com/capstone-engine/capstone) fork. But wouldn't open a PR until the maintainer gave feedback if it makes sense for the LLVM use case.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUVFFvozgQ_jXOyygIDITwwMO2vZwi7UnVanXvYzMEX42NPKZp_v3JpNmmPemklRAGe_zNN_N9GmQ2J0fUifpB1E8bXOLoQ_fDx0I2G-X7S_fszxSeH0EFdHo07gTGcQyLjsY7BrQGGTAQGKf9NFuKZC9CHoy1254G46gH4-AnKkt_khPyEc6j0SNYwp4hekCwJkZLYKY5kDZM0BtGZpqUvWQifxL5t-v7j-yUQRwJBm-tPyc2d6HAo19sD3MwLq5hV3ZqidB7YidkE0X57R5R7PLro5DH6xbp0YOQMn-rtJCP-du-XJe8WheZCylBNI9g7eu0nTRstx8kCLbbGMxsSZRP86xvudos0lv89ae0jkHkbYKE8hMheRDyAMd4q0bRp-O8VcP17uI-3fDhPxHsvxR5j_RzNAwjzjM5BkUaF6a1aTepYDCWGCbDDEyvFNDeuWBt7bs4D8SmJ4Y4YkwFTeguX0NXj9wMgQyB0H6y0jvWEZB5mVYqyVUMmGLZOziPF2AvysN9GUcHKZtGppT6CIN5ox5iqk7UDwlE1E9C7scYZ07qr-06mTguKtN-EvKgceboHW3JnYwjIQ-rtLftFOGnycT0UdGgqhx7Ik24K3Y46EK2u1wpXeWyyveSql29F7KFwQfwS0g0Hm9Qv0_lg8WK-JLBwxLhnLyxGhr8TA4Qnn_A4qKxq4YTGhfROApwwleCgahXqF_ADGAiTPhCSVTHtLJMV75___svSB5Ircw2fVf2bdnihrqiKYu2bOqy3ozdUKhmX-5qlFVZNU3bDEor2UokbOudbjemk7msiqLYF2VVl3WW95Us5TDQft-XdZOLKqcJjc1SkzMfThvDvFBXFLtd0W4sKrK8TiQpHZ1hPRVSpgEVulUZtZxYVLk1HPkDJppoqTv-mkNfptDVkDc3uv5-dGyWYLv_kSXluNliDv4f0skMKzMW8vBO_bWT_wYAAP___rKzLA">