eopXD added inline comments.

================
Comment at: clang/lib/Sema/SemaChecking.cpp:4968
+void Sema::checkRVVTypeSupport(QualType Ty, SourceLocation Loc, ValueDecl *D) {
+  const TargetInfo &TI = Context.getTargetInfo();
+  if (Ty->isRVVType(/* Bitwidth */ 64, /* IsFloat */ false) &&
----------------
craig.topper wrote:
> Do we need to diagnose the use of any RVV type without at least zve32x?
If users will be using RVV intrinsic types, they will need to include 
<riscv_vector.h>, and the header is guarded by zve32x. So I think we don't need 
the check for at least zve32x.

```
$ bin/clang -march=rv64g -emit-llvm -S -o - test.c
In file included from test.c:1:
/scratch/eopc/upstream-llvm-project2/build/lib/clang/17/include/riscv_vector.h:18:2:
 error: "Vector intrinsics require the vector extension."
   18 | #error "Vector intrinsics require the vector extension."
      |  ^
1 error generated.
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D153510

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to