This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Support inline assembler constraints for MVE.
ClosedPublic

Authored by simon_tatham on Apr 15 2019, 6:00 AM.

Details

Summary

"To" selects an odd-numbered GPR, and "Te" an even one. There are some
8.1-M instructions that have one too few bits in their register fields
and require registers of particular parity, without necessarily using
a consecutive even/odd pair.

Also, the constraint letter "t" should select an MVE q-register, when
MVE is present. This didn't need any source changes, but some extra
tests have been added.

Diff Detail

Repository
rL LLVM

Event Timeline

simon_tatham created this revision.Apr 15 2019, 6:00 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptApr 15 2019, 6:00 AM

Is this coordinated with GCC?

t.p.northover accepted this revision.Apr 15 2019, 7:53 AM

Excellent, looks good to me then.

This revision is now accepted and ready to land.Apr 15 2019, 7:53 AM

Remastered patch to apply cleanly against current trunk.

Rebased this patch to current trunk, and also fixed a test failure by adding arm_aapcs_vfpcc to the test functions that use MVE vector types (since we can't support passing vector types in GPRs until we get all the operations like build_vector and insert_element fully supported).

dmgreen accepted this revision.Jun 25 2019, 9:17 AM
This revision was automatically updated to reflect the committed changes.
craig.topper added inline comments.
cfe/trunk/lib/Basic/Targets/ARM.cpp
912

Is this supposed to fallthrough from 'T' to 'U'? If so can you add an LLVM_FALLTHROUGH

llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
14098

Is this supposed to fallthrough from case 1 to case 2?

14113

Is this supposed to fallthrough?

simon_tatham marked 3 inline comments as done.Jun 26 2019, 1:29 AM
simon_tatham added inline comments.
cfe/trunk/lib/Basic/Targets/ARM.cpp
912

No, it wasn't supposed to; sorry about that. rL364380 has fixed it in a way that looks right to me.

llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
14098

No, and rL364376 looks like the right fix to me.

14113

No, and rL364376 looks like the right fix to me.