This is an archive of the discontinued LLVM Phabricator instance.

[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 Timeline

paquette created this revision.Mar 13 2019, 1:48 PM
paquette updated this revision to Diff 190519.Mar 13 2019, 3:20 PM

rebase against changes to emitLaneInsert and include change to the legalizer info test I forgot to include

paquette updated this revision to Diff 190541.Mar 13 2019, 4:37 PM

Rebase against changes to emitLaneInsert

aemerson added inline comments.Mar 13 2019, 4:41 PM
llvm/lib/Target/AArch64/AArch64LegalizerInfo.cpp
455

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.

paquette updated this revision to Diff 190649.Mar 14 2019, 9:20 AM
paquette marked an inline comment as done.

Fix up legalizer info stuff

aemerson added inline comments.Mar 14 2019, 9:47 AM
llvm/lib/Target/AArch64/AArch64LegalizerInfo.cpp
457

Tests for < 128b vectors?

paquette updated this revision to Diff 190665.Mar 14 2019, 10:40 AM

Restrict legal types to exactly v4s32 and v2s64, add TODOs for other types.

aemerson accepted this revision.Mar 14 2019, 10:54 AM
This revision is now accepted and ready to land.Mar 14 2019, 10:54 AM
This revision was automatically updated to reflect the committed changes.