[llvm] [RISCV][GISel] Add initial support for rvv intrinsics (PR #156415)

Jianjian Guan via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 3 01:51:13 PDT 2025


================
@@ -707,6 +707,14 @@ RISCVLegalizerInfo::RISCVLegalizerInfo(const RISCVSubtarget &ST)
 bool RISCVLegalizerInfo::legalizeIntrinsic(LegalizerHelper &Helper,
                                            MachineInstr &MI) const {
   Intrinsic::ID IntrinsicID = cast<GIntrinsic>(MI).getIntrinsicID();
+
+  const RISCVVIntrinsicsTable::RISCVVIntrinsicInfo *II =
+      RISCVVIntrinsicsTable::getRISCVVIntrinsicInfo(IntrinsicID);
+
+  if (II) {
+    return true;
+  }
----------------
jacquesguan wrote:

Addressed, I was thinking to use the intrinsic info to identify which rvv intrinsics need specific legalization, since the change is not in this pr, I changed this to the suggested form.

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


More information about the llvm-commits mailing list