[PATCH] D138810: [RISCV] Support vector crypto extension C intrinsics
Craig Topper via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 2 10:53:30 PDT 2023
craig.topper added inline comments.
================
Comment at: clang/lib/Sema/SemaChecking.cpp:4496
+static bool CheckInValidEGW(const TargetInfo &TI, CallExpr *TheCall, Sema &S,
+ QualType Type, int EGW) {
----------------
InValid -> Invalid
================
Comment at: clang/lib/Sema/SemaChecking.cpp:4499
+ assert((EGW == 128 || EGW == 256) && "EGW can only be 128 or 256 bits");
+ llvm::SmallVector<std::pair<int, const char *>> ValidPairs128 =
+ {{1, "zvl256b"}, {2, "zvl128b"}, {4, "zvl64b"}};
----------------
Can this be a plain array or a std::array instead of SmallVector since the size is fixed.
================
Comment at: clang/lib/Sema/SemaChecking.cpp:4693
+ }
+ case RISCVVector::BI__builtin_rvv_vaesdf_vv:
+ case RISCVVector::BI__builtin_rvv_vaesdf_vs:
----------------
Are there `tu` versions of these builtins?
================
Comment at: clang/test/Sema/zvk-invalid.c:19
+ __riscv_vaesdf_vv_u32mf2(vd, vs2, vl); // expected-error {{RISC-V type 'vuint32mf2_t' (aka '__rvv_uint32mf2_t') requires the 'zvl256b' extension}}
+}
----------------
Test a _vs intrinsic since the vs operand has a different type than the result?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138810/new/
https://reviews.llvm.org/D138810
More information about the cfe-commits
mailing list