This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][GlobalISel] Fix manual selection for v4s16 and v8s8 G_DUP
ClosedPublic

Authored by paquette on Feb 22 2021, 4:45 PM.

Details

Summary

The manual G_DUP selection code would produce DUPv16i8 for v8s8s and DUPv8i16 for v4s16.

This adds the missing cases to the manual selection code, and makes it return false when there is an unexpected size.

Update select-dup.mir to reflect the change.

Diff Detail

Event Timeline

paquette created this revision.Feb 22 2021, 4:45 PM
paquette requested review of this revision.Feb 22 2021, 4:45 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 22 2021, 4:45 PM
aemerson accepted this revision.Feb 23 2021, 10:25 PM
aemerson added inline comments.
llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
3217

I think it's probably more readable if you just do a sequence of checks using LLT comparisons. I.e.

if (SrcTy == LLT::vector(8, 16))
   ....
else if (SrcTy == LLT::vector(4, 16))
   ....
etc
This revision is now accepted and ready to land.Feb 23 2021, 10:25 PM