[llvm] [RISCV] Add codegen support for ri.vinsert.v.x and ri.vextract.x.v (PR #136708)
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 24 08:50:43 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)) {
----------------
preames wrote:
This is a good question, one I hadn't considered. The current scheme is what we've been using downstream and seems to generate decent code, but I'll watch for the vtype issue and may readjust this in a future patch.
https://github.com/llvm/llvm-project/pull/136708
More information about the llvm-commits
mailing list