This is an archive of the discontinued LLVM Phabricator instance.

[AArch64 NEON] Add more scenarios to use perm instructions when lowering shuffle_vector.
ClosedPublic

Authored by kevin.qin on Jan 10 2014, 1:07 AM.

Details

Reviewers
t.p.northover
Summary

Hi,

This patch covered 2 more scenarios:

  1. Two operands of shuffle_vector are the same, like

%shuffle.i = shufflevector <8 x i8> %a, <8 x i8> %a, <8 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14>

  1. One of operands is undef, like

%shuffle.i = shufflevector <8 x i8> %a, <8 x i8> undef, <8 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14>

After this patch, perm instructions will have chance to be emitted instead of lots of INS. Please review, thanks.

Diff Detail

Event Timeline

t.p.northover accepted this revision.Jan 10 2014, 7:18 AM

Hi Kevin,

This looks reasonable to me.

Cheers.

Tim.

Eugene.Zelenko closed this revision.Oct 3 2016, 6:54 PM
Eugene.Zelenko added a subscriber: Eugene.Zelenko.

Committed in rL199069.