This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Add fp16 addressing to isLegalT2AddressImmediate
ClosedPublic

Authored by dmgreen on Jun 6 2019, 9:59 AM.

Details

Summary

The fp16 version of VLDR takes a imm8 multiplied by 2. This updates the costs to account for those, and adds extra testing (which I've just shown the diff of here). It is dependant upon hasFPRegs16 as this is what the load/store instructions require.

Diff Detail

Repository
rL LLVM

Event Timeline

dmgreen created this revision.Jun 6 2019, 9:59 AM
samparker added inline comments.Jun 7 2019, 12:51 AM
llvm/test/Analysis/CostModel/ARM/gep.ll
329 ↗(On Diff #203391)

Could you add testing for around an offset of +/- 510?

dmgreen added inline comments.Jun 7 2019, 5:16 AM
llvm/test/Analysis/CostModel/ARM/gep.ll
329 ↗(On Diff #203391)

These are gep offsets so all "number of units", not "bytes". Is that what you meant? It caught me out originally.

(Yes, this makes testing unaligned access harder, like an byte offset of 1, not 2)

samparker accepted this revision.Jun 7 2019, 7:10 AM

LGTM.

llvm/test/Analysis/CostModel/ARM/gep.ll
329 ↗(On Diff #203391)

Ah, yeah!

This revision is now accepted and ready to land.Jun 7 2019, 7:10 AM
This revision was automatically updated to reflect the committed changes.