[PATCH] D143665: [Clang][RISCV] Guard vector int64, float32, float64 with semantic analysis
Yueh-Ting (eop) Chen via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 9 17:46:13 PST 2023
eopXD added inline comments.
================
Comment at: clang/lib/Sema/Sema.cpp:2049
- if (Ty->isVectorFloat16Type() &&
- !Context.getTargetInfo().hasVectorFloat16Support()) {
+ if ((Ty->isVectorInt64Type() &&
+ !Context.getTargetInfo().hasVectorInt64Support()) ||
----------------
> Overall it might be cleaner to call S.Context.getTargetInfo().hasFeature( from RISCV-V specific code in Sema instead of trying to define a generic interface.
If so, we will have something like:
```
if (Ty->isRVVInt64Type() && !Context.getTargetInfo().hasFeature("zve64x")) {
Diag(Loc, diag::err_riscv_type_requires_extension, FD) << Ty << "zve64x";
}
```
I don't have a preference here, if this matches your expectation, I will update the revision this way.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D143665/new/
https://reviews.llvm.org/D143665
More information about the cfe-commits
mailing list