[llvm] [RISCV][ISel] Add ISel support for experimental Zimop extension (PR #77089)

Wang Pengcheng via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 8 19:29:40 PST 2024


================
@@ -108,6 +108,26 @@ let TargetPrefix = "riscv" in {
   def int_riscv_xperm8  : BitManipGPRGPRIntrinsics;
 } // TargetPrefix = "riscv"
 
+//===----------------------------------------------------------------------===//
+// May-Be-Operations
+
+let TargetPrefix = "riscv" in {
+
+  class MOPGPRIntrinsics
+      : DefaultAttrsIntrinsic<[llvm_any_ty],
+                              [LLVMMatchType<0>, LLVMMatchType<0>],
+                              [IntrNoMem, IntrSpeculatable]>;
+  class MOPGPRGPRIntrinsics
+      : DefaultAttrsIntrinsic<[llvm_any_ty],
+                              [LLVMMatchType<0>, LLVMMatchType<0>, LLVMMatchType<0>],
+                              [IntrNoMem, IntrSpeculatable]>;
+
+  // Zimop
+  def int_riscv_mopr : MOPGPRIntrinsics;
----------------
wangpc-pp wrote:

We can just drop these MOP* classes as there is just one definition.
```
def int_riscv_mopr : DefaultAttrsIntrinsic<...>
def int_riscv_moprr : DefaultAttrsIntrinsic<...>
```

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


More information about the llvm-commits mailing list