This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][SVE] Optimize bitcasts between unpacked half/i16 vectors.
ClosedPublic

Authored by sdesmalen on Jul 16 2021, 3:22 AM.

Details

Summary

The case for nxv2f32/nxv2i32 was already covered by D104573.
This patch builds on top of that by making the mechanism work for
nxv2[b]f16/nxv2i16, nxv4[b]f16/nxv4i16 as well.

Diff Detail

Event Timeline

sdesmalen created this revision.Jul 16 2021, 3:22 AM
sdesmalen requested review of this revision.Jul 16 2021, 3:22 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 16 2021, 3:22 AM
Matt added a subscriber: Matt.Jul 16 2021, 11:24 AM
efriedma accepted this revision.Jul 16 2021, 4:52 PM

LGTM with a couple minor comments.

llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
3527

I'm wondering if this is going to blow up if you try to bitcast <vscale x 1 x double> %v to <vscale x 2 x float> or something like that... maybe not worth worrying about at the moment.

16962

"return;"?

This revision is now accepted and ready to land.Jul 16 2021, 4:52 PM
sdesmalen marked 2 inline comments as done.Jul 19 2021, 12:30 AM
sdesmalen added inline comments.
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
3527

Yes, although trying that example runs into other trouble before reaching this code.
Using an ANY_EXTEND won't work for the fp->fp bitcast, so at least the assert guards that for now.

This revision was landed with ongoing or failed builds.Jul 19 2021, 12:30 AM
This revision was automatically updated to reflect the committed changes.
sdesmalen marked an inline comment as done.