This adds support for inserting elements into packed vectors. It also adds two tests: one for selection, and one for regbank select.
Unpacked vectors will come in a follow-up.
Paths
| Differential D59325
[GlobalISel][AArch64] Add partial selection support for G_INSERT_VECTOR_ELT ClosedPublic Authored by paquette on Mar 13 2019, 1:48 PM.
Details Summary This adds support for inserting elements into packed vectors. It also adds two tests: one for selection, and one for regbank select. Unpacked vectors will come in a follow-up.
Diff Detail Event TimelineHerald added subscribers: Petar.Avramovic, hiraditya, kristof.beyls and 2 others. · View Herald Transcript paquette added parent revisions: D59323: [AArch64][GlobalISel] Gardening: Simplify subregister copy in selectBuildVector, D59322: [GlobalISel][AArch64] Gardening: Factor out vector inserts.Mar 13 2019, 1:48 PM paquette added a parent revision: D59324: [GlobalISel][AArch64] Gardening: Factor out code to find lane indices. Comment Actions rebase against changes to emitLaneInsert and include change to the legalizer info test I forgot to include
This revision is now accepted and ready to land.Mar 14 2019, 10:54 AM Closed by commit rG5aff1f475c60: [GlobalISel][AArch64] Add partial selection support for G_INSERT_VECTOR_ELT (authored by paquette). · Explain WhyMar 14 2019, 11:02 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 190519 llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp
llvm/lib/Target/AArch64/AArch64LegalizerInfo.cpp
llvm/lib/Target/AArch64/AArch64RegisterBankInfo.cpp
llvm/test/CodeGen/AArch64/GlobalISel/legalizer-info-validation.mir
llvm/test/CodeGen/AArch64/GlobalISel/regbank-insert-vector-elt.mir
llvm/test/CodeGen/AArch64/GlobalISel/select-insert-vector-elt.mir
|
Type 0 should always be a vector, else it (should be) a verifier error so I don't think it's related to legality.
Likewise with the "Types[0].getElementType() == Query.Types[1]", that should be true otherwise it's an invalid instruction.
Here we should probably specify legality by using a whitelist of vector types that Type 0 could take, or some other way or narrowing down the legal types.