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

    <tr>
        <th>Summary</th>
        <td>
            [RISC-V] Inconsistent implied/required extension behavior for zabha/zvk*
        </td>
    </tr>

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

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

    <tr>
      <th>Reporter</th>
      <td>
          patrick-rivos
      </td>
    </tr>
</table>

<pre>
    Zabha/Zvk currently requires the user to specify Zaamo/{V|Zve}.

Godbolt:
zabha: https://godbolt.org/z/nd6jz1vbc
zvk: https://godbolt.org/z/Pb9KWr9Y8

This isn't consistent with the RISC-V spec:
Zabha spec: https://github.com/riscv/riscv-isa-manual/blob/d2999932625d2cab25bb2081f7da915411e65ad3/src/zabha.adoc?plain=1#L28-L29
Zvk* spec: https://github.com/riscv/riscv-isa-manual/blob/d2999932625d2cab25bb2081f7da915411e65ad3/src/vector-crypto.adoc?plain=1#L471-L473

"requires" is equivalent to "depends upon": https://github.com/riscv/riscv-v-spec/issues/723#issuecomment-949542444
"depends upon" seems to be specified behavior: https://github.com/riscv/riscv-isa-manual/blob/399c9a759eb4540a65c60e2cc236164821ff2346/src/naming.tex#L46

This behavior isn't consistent within LLVM:
[zcb "depends upon" zca](https://github.com/riscv/riscv-isa-manual/blob/d2999932625d2cab25bb2081f7da915411e65ad3/src/zc.adoc?plain=1#L130) and is implicitly added by llvm: https://godbolt.org/z/aoYGbaWvz
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzEVM2K5DYYfBr1RbiRP8k_Ovgws42XJRMISZhl56Y_t7VjS44kO9v99MHu7tlhMwkbAsnFRkKi6qsqlYjRHp0xDSruUXHYiTn1PjSTSMGq5yzYxced9PrUPAnZCwTt0_KM1RyCcWk44WB-m20wEafe4DmagJPHcTLKdif8JMToEbSoun9E1bunxaDqsEfkgMjd5fvea-mHhOh1fd5A6B3uU5riug0tgvZ4Obb34YigPSNonS4_n_NFquu95fl7bv0k-Q8fA_9Uv-bwa28jttEhqBJW3kUbk3EJ_25Tv43184df3mWP21QvRDc1blvf4trUz3Kv_IigDTaq5fbPbBTZKNwsBgStHLxE0GrgnHMKJRQalJBQSAmkzrtKC54XLM9NWQhNEbQxqHWSFXsvtFeIttMgrEP0kCOgD1BnD8CvDJdnBHf_E8XFqORDpsJpSv5NqqzKswdW0ddOIIBbnhAAthGvq0UMqx3JYwSgzWScjnievEMA_2iyJdvEgNbGOK8QbQUUAd2Wyo-jcSnjjBcMGGMvlL6BxNGYMa50pLkm3RqNpenFYn3411pTzhUXVcGNZAUjoixUSQwoBbTMS1ZD3nVAWfmitROjdcd9Ml82Xcs_ZftG7a9Cbh1-eHj88SXbqLg_K_mG2visBCoOCOr_OPDqzQjllCDgWDi9RsWO02CVXUtJaL06csLDsIzf0wvCf3ovxcflvNMN1ZxysTNNXgHwumQAu74puSIFJRxq03WGq7IqBSGMi64mNO-6nW2AACM1KYECAdhDbnhdMFLLSpPKMMSIGYUd9iupFXu35a7JCQDju0FIM8RbDYdmPZXJ-RgRI4ONKX69l2watsK-FBMqDviDe-XppoTRqweX16Sx-ZKMi9a7r2HofMDna6eft67YzWFo_sbZTc3LL5uC_2xUev2YroMsDfwRAAD__7vI-XI">