[GlobalISel] Introduce G_BUILD_VECTOR, G_BUILD_VECTOR_TRUNC and G_CONCAT_VECTOR opcodes.
authorAmara Emerson <aemerson@apple.com>
Wed, 5 Dec 2018 23:53:30 +0000 (23:53 +0000)
committerAmara Emerson <aemerson@apple.com>
Wed, 5 Dec 2018 23:53:30 +0000 (23:53 +0000)
commita0b15d8f3e61d7f47810c07fea56ecc88fccd2d0
tree80dd6f1ae63500ee055ac96fe69d0e7d01f0cd66
parent8adc72d176bb51974b973ce17f50d510277cb1e5
[GlobalISel] Introduce G_BUILD_VECTOR, G_BUILD_VECTOR_TRUNC and G_CONCAT_VECTOR opcodes.

These opcodes are intended to subsume some of the capability of G_MERGE_VALUES,
as it was too powerful and thus complex to add deal with throughout the GISel
pipeline.

G_BUILD_VECTOR creates a vector value from a sequence of uniformly typed
scalar values. G_BUILD_VECTOR_TRUNC is a special opcode for handling scalar
operands which are larger than the destination vector element type, and
therefore does an implicit truncate.

G_CONCAT_VECTOR creates a vector by concatenating smaller, uniformly typed,
vectors together.

These will be used in a subsequent commit. This commit just adds the initial
infrastructure.

Differential Revision: https://reviews.llvm.org/D53594

llvm-svn: 348430
llvm/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h
llvm/include/llvm/Support/TargetOpcodes.def
llvm/include/llvm/Target/GenericOpcodes.td
llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
llvm/lib/CodeGen/MachineVerifier.cpp
llvm/test/CodeGen/AArch64/GlobalISel/legalizer-info-validation.mir
llvm/test/Verifier/gisel-g_build_vector.mir [new file with mode: 0644]
llvm/test/Verifier/gisel-g_build_vector_trunc.mir [new file with mode: 0644]
llvm/test/Verifier/gisel-g_concat_vector.mir [new file with mode: 0644]