This is an archive of the discontinued LLVM Phabricator instance.

[mips][microMIPS] Add CodeGen support for MUL* and DMUL* instructions
ClosedPublic

Authored by zbuljan on Dec 23 2015, 5:44 AM.

Details

Summary

The patch adds CodeGen support for microMIPS32r6 MUL* and microMIPS64r6 DMUL* instructions:

  • updated mul.ll with tests for microMIPSr6 MUL* and DMUL* instruction selection
  • separated microMIPSr6 MUL* and DMUL* instructions from equivalent MIPS instructions using NotInMicroMips predicate
  • added DAG patterns to description classes for proper selection of MUL* and DMUL* instructions
  • implemented DMUL, DMUH, DMULU and DMUHU instructions for microMIPS64r6 and added tests for the standard encodings

Diff Detail

Repository
rL LLVM

Event Timeline

zbuljan updated this revision to Diff 43525.Dec 23 2015, 5:44 AM
zbuljan retitled this revision from to [mips][microMIPS] Add CodeGen support for MUL* and DMUL* instructions.
zbuljan updated this object.
zbuljan added subscribers: petarj, llvm-commits.
zbuljan updated this revision to Diff 45679.Jan 22 2016, 4:39 AM

Rebased to work with top of the tree.
Updated mul.ll with test for microMIPS32r3.

sdardis added a subscriber: sdardis.

Can you rebase and repost?

Thanks.

lib/Target/Mips/MicroMips32r6InstrInfo.td
259 ↗(On Diff #45679)

Is there any reason why this one is not changed?

lib/Target/Mips/Mips32r6InstrInfo.td
723–732 ↗(On Diff #45679)

These two blocks can be joined together but leave a blank line between the fp msubfs and the integer multiplies.

lib/Target/Mips/Mips64InstrInfo.td
385 ↗(On Diff #45679)

This is the Octeon multiply, you're looking to change DMULT I believe.

test/MC/Mips/micromips64r6/valid.s
153–160 ↗(On Diff #45679)

Line up the "# encoding.." parts with the rest of the file.

sdardis requested changes to this revision.Apr 21 2016, 4:47 AM
sdardis edited edge metadata.
This revision now requires changes to proceed.Apr 21 2016, 4:47 AM
zbuljan updated this revision to Diff 56242.May 5 2016, 1:06 AM
zbuljan edited edge metadata.

Rebased to work with TOT.
Updated according to comments received from sdardis.

sdardis accepted this revision.May 5 2016, 8:18 AM
sdardis edited edge metadata.

LGTM.

This revision is now accepted and ready to land.May 5 2016, 8:18 AM
This revision was automatically updated to reflect the committed changes.