[PATCH] D153510: [Clang][RISCV] Check type support for local variable declaration of RVV type

Craig Topper via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 26 00:29:28 PDT 2023


craig.topper added inline comments.


================
Comment at: clang/lib/Sema/SemaChecking.cpp:4969
+  const TargetInfo &TI = Context.getTargetInfo();
+  if ((Ty->isRVVBoolType() ||
+       Ty->isRVVType(/* Bitwidth */ 8, /* IsFloat */ false) ||
----------------
We don't to check exactly what type it is.  We can do `if (!TI.hasFeature("zve32x"))` after all the other checks. The caller already checked it was an RVV type. We don't need to know anymore about the type, they all require zve32x.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D153510



More information about the cfe-commits mailing list