[clang] [RISCV] Add missing V extensions for zvk-invalid-features.c (PR #66875)

Brandon Wu via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 20 03:23:08 PDT 2023


https://github.com/4vtomat updated https://github.com/llvm/llvm-project/pull/66875

>From f2321c370a71272b179ee596918205a226008bec Mon Sep 17 00:00:00 2001
From: 4vtomat <brandon.wu at sifive.com>
Date: Wed, 20 Sep 2023 01:44:33 -0700
Subject: [PATCH] [RISCV] Add missing V extensions for zvk-invalid-features.c

If we don't include riscv_vector.h, even we add the target-feature,
it still can't find the intrinsic interface.
---
 clang/test/Sema/zvk-invalid-features.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/clang/test/Sema/zvk-invalid-features.c b/clang/test/Sema/zvk-invalid-features.c
index be1170df8f0c719..05dd6498ce01ec9 100644
--- a/clang/test/Sema/zvk-invalid-features.c
+++ b/clang/test/Sema/zvk-invalid-features.c
@@ -1,5 +1,7 @@
 // REQUIRES: riscv-registered-target
-// RUN: %clang_cc1 -triple riscv64 %s -fsyntax-only -verify
+// RUN: %clang_cc1 -triple riscv64 %s -target-feature +v -fsyntax-only -verify
+
+#include <riscv_vector.h>
 
 void test_zvk_features() {
   // zvbb



More information about the cfe-commits mailing list