Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp | ||
---|---|---|
705–707 | Thanks for helping to fix, would it make sense to add some other types, such as v2s8 ? |
I would like to only do the minimal fix for your PR. Yes, there are more legal vectors.
ok, thanks.
I'm not familiar with this module, It is better to confirm it with the other expert.
As we will not have any tablegen patterns for v2s16 types, it may be better to legalize it to a v4s16 instead by clamping the number of elements.
G_INSERT_VECTOR_ELT is manually handled by the instruction selector:
https://github.com/llvm/llvm-project/blob/feaf70b3cd64d09566ec667ce95340056c358ca2/llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp#L5447
You can just add the test case to the existing one in AArch64/GlobalISel/legalize-insert-vector-elt.mir
llvm/test/CodeGen/AArch64/GlobalISel/pr-63826.mir | ||
---|---|---|
18–19 ↗ | (On Diff #540934) | I prefer to use real values instead of undef for these in case some legalizer combine tries to be smart and elides them in future. For aarch64 you can just use copies from the fpr registers: %1:_(s16) = COPY $h0 %2:_(s16) = COPY $h1 |
Thanks for helping to fix, would it make sense to add some other types, such as v2s8 ?
https://gcc.godbolt.org/z/azrjv64E8