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

    <tr>
        <th>Summary</th>
        <td>
            [RISCV] LLVM doesn't support B extension in march
        </td>
    </tr>

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

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

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

<pre>
    LLVM used to support the `B` extension as part of the RISC-V `-march` ISA string, but it was dropped a few years ago in ae116f43ff140edfae166370ab6bc9ae3f556710.

I wasn't working on RISC-V then so I'm not sure what happened, but today, the B extension is ratified. [Supporting `B` implies `Zba`, `Zbb` and `Zbs`](https://riscv-specs.timhutt.co.uk/spec/20240411/unpriv-isa-asciidoc.html#bits) which are subsets of it.

> The B standard extension comprises instructions provided by the Zba, Zbb, and Zbs extensions.

Currently if you try to use a `march` with B it says `clang: error: invalid arch name 'rv64imafdcbv_zicbom_zicboz_zicntr_zicond_zicsr_zifencei_zihpm_zimop0p1_zawrs_zfa_zfh_zca_zcb_zcd_zcmop0p2_zbc_zbkb_zbkc_zbkx_zknd_zkne_zknh_zkr_zksed_zksh_zvbb_zvbc_zvkg_zvkned_zvknha_zvknhb_zvksh', unsupported standard user-level extension 'b'`

</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxUVM1u4zgMfhrlQiSQ5b_kkEPaboACs5ftoIe5GPqhY21syRBlZ-KnX8hNt50LaZoUxe8TSUlkLw7xyMonVr5s5BQ7H44_7TAMw0Z5cz_--PH-N0yEBqIHmsbRhwixQ2AVf2IVB_wd0ZH1DiTBKEME364B_7y-PW_fU9x2kEF3Kfj17QQUg3UXJp5BTRFshJskMMGPIxqQ0OIN7igDgbx4sA4kZlnVFnnbZgVH00rMqiqvuVSV0geJeVuWVZ3xHeMnxk-vKZ9joo5w8-Fq3QW8-ywmduiAPLwyUQ_gfASaA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