[SelectionDAG] Add llvm.vector.{extract,insert} intrinsics
authorJoe Ellis <joe.ellis@arm.com>
Wed, 9 Dec 2020 11:05:51 +0000 (11:05 +0000)
committerJoe Ellis <joe.ellis@arm.com>
Wed, 9 Dec 2020 11:08:41 +0000 (11:08 +0000)
commit80c33de2d3c59ca357c67b2b2475d27f79dd8a8b
treece06aa972c0feca917cd8cc5b6f4dd1ae2c8354a
parent4167a0259ec33a11530a6503e96acedaf3cb6a3d
[SelectionDAG] Add llvm.vector.{extract,insert} intrinsics

This commit adds two new intrinsics.

- llvm.experimental.vector.insert: used to insert a vector into another
  vector starting at a given index.

- llvm.experimental.vector.extract: used to extract a subvector from a
  larger vector starting from a given index.

The codegen work for these intrinsics has already been completed; this
commit is simply exposing the existing ISD nodes to LLVM IR.

Reviewed By: cameron.mcinally

Differential Revision: https://reviews.llvm.org/D91362
llvm/docs/LangRef.rst
llvm/include/llvm/IR/Intrinsics.td
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
llvm/lib/IR/Verifier.cpp
llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
llvm/test/CodeGen/AArch64/sve-extract-vector.ll [new file with mode: 0644]
llvm/test/CodeGen/AArch64/sve-insert-vector.ll [new file with mode: 0644]
llvm/test/Transforms/InstCombine/canonicalize-vector-extract.ll [new file with mode: 0644]
llvm/test/Transforms/InstCombine/canonicalize-vector-insert.ll [new file with mode: 0644]
llvm/test/Verifier/extract-vector-mismatched-element-types.ll [new file with mode: 0644]
llvm/test/Verifier/insert-vector-mismatched-element-types.ll [new file with mode: 0644]