diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp
--- a/clang/lib/Sema/SemaChecking.cpp
+++ b/clang/lib/Sema/SemaChecking.cpp
@@ -3395,7 +3395,7 @@
   switch (BuiltinID) {
   default:
     break;
-#define BUILTIN(ID, TYPE, ATTRS) case RISCV::BI##ID:
+#define RISCVV_BUILTIN(ID, TYPE, ATTRS) case RISCV::BI##ID:
 #include "clang/Basic/BuiltinsRISCV.def"
     if (!TI.hasFeature("experimental-v"))
       return Diag(TheCall->getBeginLoc(), diag::err_riscvv_builtin_requires_v)