This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Handle VECTOR_SHUFFL mask with splats
AbandonedPublic

Authored by jaykang10 on May 2 2023, 1:57 AM.

Details

Summary

As discussed on https://reviews.llvm.org/D148347, we could handle the vector shuffle mask with splats more efficiently with dup.

Diff Detail

Event Timeline

jaykang10 created this revision.May 2 2023, 1:57 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 2 2023, 1:57 AM
jaykang10 requested review of this revision.May 2 2023, 1:57 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 2 2023, 1:57 AM

When I was mentioning the testcases in D149638, I was think of cases like test11 in build-vector-two-dup.ll. For values already in vector registers, replacing a tbl with three shuffle instructions probably isn't an improvement (particularly on newer cores where tbl is fast).

jaykang10 abandoned this revision.May 4 2023, 2:07 AM

When I was mentioning the testcases in D149638, I was think of cases like test11 in build-vector-two-dup.ll. For values already in vector registers, replacing a tbl with three shuffle instructions probably isn't an improvement (particularly on newer cores where tbl is fast).

Thanks for kind comment.
From the diff of the test output, I was not sure this transformation is useful even though it does not use constant pool... As you mentioned, in loop, the constant pool load could be hoisted...
Let me close this patch.