llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang <details> <summary>Changes</summary> isRVVType() is suprisingly expensive, so do the checks only if the target has rvv types. --- Full diff: https://github.com/llvm/llvm-project/pull/67669.diff 1 Files Affected: - (modified) clang/lib/Sema/Sema.cpp (+1-1) ``````````diff diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp index a401017d4c1c0b8..2d175c9b9a791dd 100644 --- a/clang/lib/Sema/Sema.cpp +++ b/clang/lib/Sema/Sema.cpp @@ -2050,7 +2050,7 @@ void Sema::checkTypeSupport(QualType Ty, SourceLocation Loc, ValueDecl *D) { targetDiag(D->getLocation(), diag::note_defined_here, FD) << D; } - if (Ty->isRVVType()) + if (TI.hasRISCVVTypes() && Ty->isRVVType()) checkRVVTypeSupport(Ty, Loc, D); // Don't allow SVE types in functions without a SVE target. `````````` </details> https://github.com/llvm/llvm-project/pull/67669 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits