diff options
author | Shao-Ce SUN <sunshaoce@outlook.com> | 2023-11-06 11:22:14 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-06 11:22:14 +0800 |
commit | fbdf6e2724e11baa4441cd053804fb2d2375817a (patch) | |
tree | 983f7f4eb123b0692806e173de7bb0d23e9fe65a /clang/lib/Sema/SemaChecking.cpp | |
parent | b68fe8699feceadfaef75ed686828252aab6b08d (diff) | |
download | llvm-fbdf6e2724e11baa4441cd053804fb2d2375817a.zip llvm-fbdf6e2724e11baa4441cd053804fb2d2375817a.tar.gz llvm-fbdf6e2724e11baa4441cd053804fb2d2375817a.tar.bz2 |
[RISCV] Introduce and use BF16 in Xsfvfwmaccqqq intrinsics (#71140)
BF16 implementation based on @joshua-arch1's
https://reviews.llvm.org/D152498
Fixed the incorrect f16 type introduced in
https://github.com/llvm/llvm-project/pull/68296
---------
Co-authored-by: Jun Sha (Joshua) <cooper.joshua@linux.alibaba.com>
Diffstat (limited to 'clang/lib/Sema/SemaChecking.cpp')
-rw-r--r-- | clang/lib/Sema/SemaChecking.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp index efad202..ae588db 100644 --- a/clang/lib/Sema/SemaChecking.cpp +++ b/clang/lib/Sema/SemaChecking.cpp @@ -6046,6 +6046,11 @@ void Sema::checkRVVTypeSupport(QualType Ty, SourceLocation Loc, Decl *D) { !TI.hasFeature("zvfh") && !TI.hasFeature("zvfhmin")) Diag(Loc, diag::err_riscv_type_requires_extension, D) << Ty << "zvfh or zvfhmin"; + // Check if enabled zvfbfmin for BFloat16 + if (Ty->isRVVType(/* Bitwidth */ 16, /* IsFloat */ false, + /* IsBFloat */ true) && + !TI.hasFeature("experimental-zvfbfmin")) + Diag(Loc, diag::err_riscv_type_requires_extension, D) << Ty << "zvfbfmin"; if (Ty->isRVVType(/* Bitwidth */ 32, /* IsFloat */ true) && !TI.hasFeature("zve32f")) Diag(Loc, diag::err_riscv_type_requires_extension, D) << Ty << "zve32f"; |