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

Jon Roelofs via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 3 07:55:22 PDT 2025


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

nit: llvm style prefers simple stmt bodies don't have `{}`s

```suggestion
  if (RISCVVIntrinsicsTable::getRISCVVIntrinsicInfo(IntrinsicID))
    return true;
```

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


More information about the llvm-commits mailing list