[PATCH] D119530: [RISCV] Add combination crypto extensions in ISAInfo

Kito Cheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 23 22:10:02 PST 2022


kito-cheng added inline comments.


================
Comment at: llvm/test/CodeGen/RISCV/attributes.ll:146
 ; RV64ZK: .attribute 5, "rv64i2p0_zbkb1p0_zbkc1p0_zbkx1p0_zk1p0_zkn1p0_zknd1p0_zkne1p0_zknh1p0_zkr1p0_zkt1p0"
+; RV64COMBINEINTOZK: .attribute 5, "rv64i2p0_zbkb1p0_zbkc1p0_zbkx1p0_zk1p0_zkn1p0_zknd1p0_zkne1p0_zknh1p0_zkr1p0_zkt1p0"
+; RV64COMBINEINTOZKN: .attribute 5, "rv64i2p0_zbkb1p0_zbkc1p0_zbkx1p0_zkn1p0_zknd1p0_zkne1p0_zknh1p0"
----------------
eopXD wrote:
> VincentWu wrote:
> > VincentWu wrote:
> > > I know that the `FeatureBits` has include the `Zk` after `updateCombination`. but this test case doesn't check it.
> > > 
> > > what about test that in `clang/test/Preprocessor/riscv-target-features.c`
> > > what about test that in `clang/test/Preprocessor/riscv-target-features.c`
> > 
> > ok, this patch is for LLVM, so ignore it.
> > 
> > but this problem is still here,“this test case doesn't check it.”
> > 
> The test case provides `zkn, zkr, zkt` and expects to have `zk1p0` within the generated attributes. I think this will cover the case added by `updateCombination`?
> 
> ```
> ; RUN: llc -mtriple=riscv64 -mattr=+zkn,+zkr,+zkt %s -o - | FileCheck --check-prefix=RV64COMBINEINTOZK %s
> ```
> 
> Maybe I had misread your concern, may you rephrase if so?
Adding test case to `clang/test/Preprocessor/riscv-target-features.c` to make sure `__riscv_zk` has defined properly for `-march=rv64i_zkn_zkr_zkt`/`-march=rv32i_zkn_zkr_zkt`? 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119530/new/

https://reviews.llvm.org/D119530



More information about the llvm-commits mailing list