This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][SVE] Enable bf16 vector.insert
ClosedPublic

Authored by MattDevereau on Dec 1 2021, 2:00 AM.

Details

Summary

Allow passthrough bf16 registers for vector.insert

Diff Detail

Event Timeline

MattDevereau created this revision.Dec 1 2021, 2:00 AM
MattDevereau requested review of this revision.Dec 1 2021, 2:00 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 1 2021, 2:00 AM
peterwaller-arm accepted this revision.Dec 1 2021, 2:04 AM

Looks reasonable to me.

This revision is now accepted and ready to land.Dec 1 2021, 2:04 AM

Do the tests have to live in a new file instead of sitting alongside the other variants in sve-insert-vector.ll? I see nothing SVE2 related here.

Do the tests have to live in a new file instead of sitting alongside the other variants in sve-insert-vector.ll? I see nothing SVE2 related here.

I saw #if defined(__ARM_FEATURE_SVE2) && defined(__ARM_FEATURE_SVE_BF16) in another file so assumed bf16 was SVE2 only

Do the tests have to live in a new file instead of sitting alongside the other variants in sve-insert-vector.ll? I see nothing SVE2 related here.

I saw #if defined(__ARM_FEATURE_SVE2) && defined(__ARM_FEATURE_SVE_BF16) in another file so assumed bf16 was SVE2 only

That will be to protect SVE2 specific BF16 instructions. SVE also has BF16 instructions, for example BFDOT. These tests only really care about the type as no BF16 related instructions are necessary so they can all sit within the same file. For a similar example see sve-vector-splat.ll.

Do the tests have to live in a new file instead of sitting alongside the other variants in sve-insert-vector.ll? I see nothing SVE2 related here.

I saw #if defined(__ARM_FEATURE_SVE2) && defined(__ARM_FEATURE_SVE_BF16) in another file so assumed bf16 was SVE2 only

That will be to protect SVE2 specific BF16 instructions. SVE also has BF16 instructions, for example BFDOT. These tests only really care about the type as no BF16 related instructions are necessary so they can all sit within the same file. For a similar example see sve-vector-splat.ll.

I realise that now since I ran some tests with sve+bf16 and they work fine. I'll move these back into the previous file :)

Matt added a subscriber: Matt.Dec 1 2021, 7:37 AM

moved tests into sve-insert-vector.ll

removed stray #

paulwalker-arm accepted this revision.Dec 1 2021, 9:39 AM

One minor issue to resolve before committing.

llvm/test/CodeGen/AArch64/sve-insert-vector.ll
469–470

Presumably this is bogus and should be removed?

This revision was landed with ongoing or failed builds.Dec 2 2021, 5:09 AM
This revision was automatically updated to reflect the committed changes.