This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Simplify VMOVRRD from extracts of buildvectors
ClosedPublic

Authored by dmgreen on Jan 19 2021, 11:42 AM.

Details

Summary

Under the softfp calling convention, we are often left with VMOVRRD(extract(bitcast(build_vector(a, b, c, d)))) for the return value of the function. These can be simplified to a,b or c,d directly, depending on the value of the extract.

Big endian is a little different because the bitcast switches the lanes around, meaning we end up with b,a or d,c.

Diff Detail

Event Timeline

dmgreen created this revision.Jan 19 2021, 11:42 AM
dmgreen requested review of this revision.Jan 19 2021, 11:42 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 19 2021, 11:42 AM
SjoerdMeijer added inline comments.Jan 28 2021, 5:23 AM
llvm/test/CodeGen/Thumb2/mve-soft-float-abi.ll
1

Do we need a BE run here too?

dmgreen updated this revision to Diff 320421.Feb 1 2021, 2:46 AM

Rebase over D94990, showing the BE tests added there.

SjoerdMeijer accepted this revision.Feb 1 2021, 2:57 AM
This revision is now accepted and ready to land.Feb 1 2021, 2:57 AM
This revision was automatically updated to reflect the committed changes.