Page MenuHomePhabricator

[ARM,AArch64] Add intrinsics for dot product instructions
ClosedPublic

Authored by olista01 on Apr 26 2018, 2:28 AM.

Details

Summary

The ACLE spec which describes these intrinsics hasn't been published yet, but this is based on the final draft which will be published soon, and these have already been implemented by GCC.

Diff Detail

Repository
rC Clang

Event Timeline

olista01 created this revision.Apr 26 2018, 2:28 AM
SjoerdMeijer accepted this revision.Apr 26 2018, 3:53 AM

I think this looks OK.

include/clang/Basic/arm_neon.td
1591

Nit: I think it's obvious, but perhaps a comment here, which would be consistent with similar remarks in this file, that this this is for both A32 and A64 (and the one below A64 only)?

include/clang/Basic/arm_neon_incl.td
256

Yes, more modifiers! ;-)

test/CodeGen/aarch64-neon-dot-product.c
7

Same nit as in of the other patches: not sure if we should spell out Armv8.2-A or if v8.2-A is actually ok.

This revision is now accepted and ready to land.Apr 26 2018, 3:53 AM
flyingforyou added inline comments.Apr 26 2018, 4:50 PM
test/CodeGen/arm-neon-dot-product.c
2

I think proper target is cortex-a55 or cortex-a75.
Do we need check routines for wrong target-cpu?

efriedma added inline comments.
test/CodeGen/arm-neon-dot-product.c
2

This is working as intended, I think: target-feature overrides target-cpu.

flyingforyou added inline comments.Apr 26 2018, 5:00 PM
test/CodeGen/arm-neon-dot-product.c
2

dotprod is ARMv8.2's addition feature not ARMv8. Cortex-a57 only supports ARMv8 which couldn't have dotprod feature. Am I missing something?

efriedma added inline comments.Apr 26 2018, 5:44 PM
test/CodeGen/arm-neon-dot-product.c
2

Oh, sorry, misunderstood the question; yes, this might not be the most clear "CHECK" line.

olista01 marked an inline comment as done.Apr 27 2018, 7:05 AM
olista01 added inline comments.
test/CodeGen/arm-neon-dot-product.c
2

I've changed this to cortex-a75 for clarity.

This revision was automatically updated to reflect the committed changes.