This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Expand CTPOP instruction for MVE
ClosedPublic

Authored by oliverlars on Aug 6 2019, 8:16 AM.

Details

Summary

MVE processors don't have a CTPOP instruction. This patch expands that instruction to allow llvm to successfully compile for MVE processors.

Diff Detail

Repository
rL LLVM

Event Timeline

oliverlars created this revision.Aug 6 2019, 8:16 AM
oliverlars updated this revision to Diff 213620.Aug 6 2019, 8:20 AM

Removed whitespace change.

dmgreen added inline comments.Aug 6 2019, 8:30 AM
llvm/test/CodeGen/Thumb2/ctpop.ll
2 ↗(On Diff #213620)

You can drop the --check-prefix=CHECK and --check-prefix=CHECK-MVE as there is only one run line.

4 ↗(On Diff #213620)

Can you:

  • change this one to a <4 x i32>
  • you add tests for <8 x i16> and <16 x i8> too.
  • probably add a <2 x i64> test too.

That will cover all the interesting bases.

oliverlars updated this revision to Diff 213626.Aug 6 2019, 8:49 AM

Added different vector size tests and removed CHECK-MVE

oliverlars marked 2 inline comments as done.Aug 6 2019, 8:49 AM
dmgreen added inline comments.Aug 6 2019, 10:32 AM
llvm/test/CodeGen/Thumb2/ctpop.ll
1 ↗(On Diff #213626)

Also, do you mind moving this to mve-ctpop.ll too, to keep it with the others.

71 ↗(On Diff #213626)

If you add arm_aapcs_vfpcc to these functions, the result will be slightly simpler for the args/return values.

oliverlars updated this revision to Diff 213822.Aug 7 2019, 2:21 AM

renamed ctpop.ll to mve-ctpop.ll and added arm_aapcs_vfpcc to the functions.

samparker accepted this revision.Aug 7 2019, 8:35 AM

LGTM.

This revision is now accepted and ready to land.Aug 7 2019, 8:35 AM