This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Add patterns for BSWAP intrinsic on MVE
ClosedPublic

Authored by oliverlars on Sep 3 2019, 9:40 AM.

Details

Summary

BSWAP can use the VREV instruction on MVE to produce better results than expanding.

Diff Detail

Repository
rL LLVM

Event Timeline

oliverlars created this revision.Sep 3 2019, 9:40 AM
oliverlars updated this revision to Diff 218703.Sep 4 2019, 7:53 AM

Added verify-machineinstrs

I guess an i8 bswap isn't a thing that makes sense! That's good.

Can you add a 64bit test. We have a vrev64.8 too if you want to try and add the codegen for it.

oliverlars updated this revision to Diff 219350.Sep 9 2019, 7:30 AM

Added test for 2i64

dmgreen accepted this revision.Sep 13 2019, 2:00 AM

LGTM

llvm/test/CodeGen/Thumb2/mve-bswap.ll
27

We get this one for free through a shuffle vector? That's good!

This revision is now accepted and ready to land.Sep 13 2019, 2:00 AM