[clang] [RISCV][Clang] Added builtin support for experimental Zimop extension (PR #79971)

Wang Pengcheng via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 5 07:28:06 PST 2024


================
@@ -5588,6 +5588,14 @@ bool Sema::CheckRISCVBuiltinFunctionCall(const TargetInfo &TI,
   // Check if rnum is in [0, 10]
   case RISCV::BI__builtin_riscv_aes64ks1i:
     return SemaBuiltinConstantArgRange(TheCall, 1, 0, 10);
+  // Check if n of mop.r.[n] is in [0, 31]
+  case RISCV::BI__builtin_riscv_mopr_32:
+  case RISCV::BI__builtin_riscv_mopr_64:
+    return SemaBuiltinConstantArgRange(TheCall, 1, 0, 31);
----------------
wangpc-pp wrote:

You may need to add some error tests for this.

https://github.com/llvm/llvm-project/pull/79971


More information about the cfe-commits mailing list