[llvm] [GlobalISel] Import extract/insert subvector (PR #110287)

Quentin Colombet via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 29 01:50:24 PDT 2024


================
@@ -2588,6 +2588,20 @@ bool IRTranslator::translateKnownIntrinsic(const CallInst &CI, Intrinsic::ID ID,
                          getOrCreateVReg(*CI.getOperand(0)),
                          getOrCreateVReg(*CI.getOperand(1)));
     return true;
+  case Intrinsic::vector_extract: {
+    ConstantInt *Index = cast<ConstantInt>(CI.getOperand(1));
+    MIRBuilder.buildExtractSubvector(getOrCreateVReg(CI),
+                                     getOrCreateVReg(*CI.getOperand(0)),
+                                     Index->getZExtValue());
+    return true;
+  }
+  case Intrinsic::vector_insert: {
----------------
qcolombet wrote:

Ah right, missed it was subvector.

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


More information about the llvm-commits mailing list