This is an archive of the discontinued LLVM Phabricator instance.

[M68k][MC] Add support for 32 bit register-register multiply/divide
ClosedPublic

Authored by ids1024 on Jun 4 2023, 8:20 PM.

Details

Summary

Previously when targeting 68020+, instruction selection attempted to
emit a 32-bit register-register multiplication, but failed at
instruction selection. With this, it succeeds.

Diff Detail

Event Timeline

ids1024 created this revision.Jun 4 2023, 8:20 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 4 2023, 8:20 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
ids1024 requested review of this revision.Jun 4 2023, 8:20 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 4 2023, 8:20 PM
myhsu added a comment.Jun 6 2023, 2:55 PM

Thank you for adding this. Could you add some codegen tests (i.e. LLVM IR -> assembly)?

glaubitz added a subscriber: glaubitz.
ids1024 updated this revision to Diff 534422.Jun 25 2023, 9:15 PM

Add codegen test, and make compiler emit 32-bit div on 68020+.

myhsu accepted this revision.Jun 28 2023, 3:47 PM

LGTM with minor comments. Thanks!
Also, since now there are several LLVM patches under your belt, you might want to obtain a commit access. Let me know if you need any help on that!

llvm/lib/Target/M68k/M68kInstrArithmetic.td
637

nit: the double quotes are not necessary. Ditto for other occurrences in this patch

This revision is now accepted and ready to land.Jun 28 2023, 3:47 PM
ids1024 updated this revision to Diff 535603.Jun 28 2023, 7:14 PM

Remove unneeded uses of "

This revision was landed with ongoing or failed builds.Jun 29 2023, 9:40 PM
This revision was automatically updated to reflect the committed changes.