This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] atomic_store_nn have a different layout to regular store
ClosedPublic

Authored by rogfer01 on Aug 24 2018, 7:24 AM.

Details

Summary

We cannot directy reuse the patters of StPat because for some reason the store DAG node and the atomic_store_nn DAG nodes put the ptr and the value in different positions. Currently we attempt to store the address to an address formed by the value.

Diff Detail

Repository
rL LLVM

Event Timeline

rogfer01 created this revision.Aug 24 2018, 7:24 AM
rogfer01 added inline comments.Aug 24 2018, 7:39 AM
lib/Target/RISCV/RISCVInstrInfoA.td
47 ↗(On Diff #162378)

My tblgen-fu is not great but perhaps we can swap the operands before using the original StPat, without having to repeat them here.

asb accepted this revision.Aug 24 2018, 10:43 AM

Really good catch - thanks for the fix!

lib/Target/RISCV/RISCVInstrInfoA.td
106 ↗(On Diff #162378)

Could you fix the extra whitespace after atomic_store_16, while you're doing this? i.e. ensuring SB/SH/SW are aligned.

This revision is now accepted and ready to land.Aug 24 2018, 10:43 AM

Thanks for the prompt review @asb!

I'll commit this soon.

rogfer01 updated this revision to Diff 162614.Aug 26 2018, 11:22 PM

ChangeLog:

  • Align syntax
This revision was automatically updated to reflect the committed changes.