This is an archive of the discontinued LLVM Phabricator instance.

[SVE] Implement lowering for fixed length vector multiplication.
ClosedPublic

Authored by paulwalker-arm on Aug 5 2020, 10:24 AM.

Details

Summary
NOTE: Also uses SVE code generation for NEON size vectors, instead of expanding i64 based vector multiplications.

Diff Detail

Event Timeline

paulwalker-arm created this revision.Aug 5 2020, 10:24 AM
paulwalker-arm requested review of this revision.Aug 5 2020, 10:24 AM

This turned out to be a slightly more complicated patch than expected due to the extract complication of NEON not supporting 64bit vector multiplies.

If I'm following correctly, this enables the use of SVE for NEON-sized vectors by default if SVE is available. I think this would actually mark the first time we're generating SVE instructions for -march=armv8.4-a+sve without the user explicitly requesting scalable vector operations, right? I'd like to see test coverage for this, at least. Or maybe we want to be more conservative for a little while...

Call me a scaredy cat but I'll take the conservative option :)
I've updated the patch to only affect 64/128-bit vector mul operations when wide vectors are enabled.

efriedma accepted this revision.Aug 5 2020, 5:44 PM

I've updated the patch to only affect 64/128-bit vector mul operations when wide vectors are enabled.

Please add test coverage for this. Otherwise LGTM

This revision is now accepted and ready to land.Aug 5 2020, 5:44 PM
paulwalker-arm added inline comments.Aug 6 2020, 2:19 AM
llvm/test/CodeGen/AArch64/sve-fixed-length-int-arith.ll
652–670

As part of the previous revert I removed the NO_SVE check lines from these tests, which means the global "CHECK-NOT for ptrue" will apply. So I'm hoping I've got the testing covered. Please let me know if I've misunderstood and extra tests are required.

This revision was landed with ongoing or failed builds.Aug 6 2020, 3:04 AM
This revision was automatically updated to reflect the committed changes.