[llvm] [RISCV] Add codegen support for ri.vinsert.v.x and ri.vextract.x.v (PR #136708)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 24 07:19:57 PDT 2025


================
@@ -9686,6 +9693,26 @@ SDValue RISCVTargetLowering::lowerINSERT_VECTOR_ELT(SDValue Op,
         return Vec;
       return convertFromScalableVector(VecVT, Vec, DAG, Subtarget);
     }
+
+    // Use ri.vinsert.v.x if available.
+    if (Subtarget.hasVendorXRivosVisni() && VecVT.isInteger() &&
+        isValidInsertExtractIndex(Idx)) {
----------------
lukel97 wrote:

If these instructions are meant to be LMUL independent do we want to do the smaller LMUL optimisation? If there's no benefit I'm wondering if this will end up just introducing more vtype toggles

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


More information about the llvm-commits mailing list