Page MenuHomePhabricator

[RISCV] Add implied zero offset load/store alias patterns
ClosedPublic

Authored by jrtc27 on Jan 23 2019, 11:31 PM.

Details

Summary

Allow load/store instructions with implied zero offset for compatibility with GNU assembler.

Diff Detail

Repository
rL LLVM

Event Timeline

kito-cheng created this revision.Jan 23 2019, 11:31 PM
lewis-revill added inline comments.
lib/Target/RISCV/RISCVInstrInfo.td
538 ↗(On Diff #183256)

LW should not be guarded by IsRV64.

541 ↗(On Diff #183256)

LD is missing here.

Some basic tests should probably be included for completeness.

Ah, I already did this in my fork, covering all the compressed and floating-point instructions too, with a complete set of tests. Probably easiest if I just post that rather than you working to produce what would turn out to be nearly-identical code?

Yes James, please post your patch and tests. Kito quickly posted this one to unblock me.

@jrtc27 feel free to upload your one, it's just a 5 minute quick patch :P

jrtc27 commandeered this revision.Feb 5 2019, 3:01 PM
jrtc27 added a reviewer: kito-cheng.
Herald added a project: Restricted Project. · View Herald TranscriptFeb 5 2019, 3:01 PM
jrtc27 updated this revision to Diff 185418.Feb 5 2019, 3:03 PM

Support all memory instructions; add test coverage

asb accepted this revision.Feb 14 2019, 2:16 AM

Thanks, this looks good to me. Needs a small fixup to apply cleanly to the previous patches in the queue (TODO comments in RISCVInstrInfo{F,D}.td were removed).

This revision is now accepted and ready to land.Feb 14 2019, 2:16 AM
jrtc27 retitled this revision from [RISCV][WIP] Add implied zero offset load/store alias pattern to [RISCV] Add implied zero offset load/store alias pattern.Feb 20 2019, 12:40 PM
jrtc27 retitled this revision from [RISCV] Add implied zero offset load/store alias pattern to [RISCV] Add implied zero offset load/store alias patterns.
jrtc27 edited the summary of this revision. (Show Details)

D50496 in the stack has now landed, so other than the TODO comments having been dropped this is now ready. Alex, are you happy to do that rebasing when you commit this, or would you like me to?

asb added a comment.Feb 21 2019, 6:07 AM

D50496 in the stack has now landed, so other than the TODO comments having been dropped this is now ready. Alex, are you happy to do that rebasing when you commit this, or would you like me to?

Committing now - thanks James!

This revision was automatically updated to reflect the committed changes.