This is an archive of the discontinued LLVM Phabricator instance.

[mips][microMIPS] Add CodeGen support for SEL.*, SELEQZ, SELNEZ, SELEQZ.*, SELNEZ.* and CMP.condn.fmt instructions
ClosedPublic

Authored by zbuljan on Jun 1 2016, 6:53 AM.

Details

Summary

The patch adds CodeGen support for microMIPS32r6 SEL.*, SELEQZ, SELNEZ, SELEQZ.* and SELNEZ.* instructions:

  • added DAG pattern definitions for proper selection of instructions
  • separated microMIPS32r6 instructions from equivalent MIPS32r6 instructions using NotInMicroMips predicate
  • added relation between microMIPS32r6 and equivalent MIPS32r6 instructions
  • fixed wrong instruction names
  • updated .ll files with tests for microMIPS32r6 select instructions

Diff Detail

Event Timeline

zbuljan updated this revision to Diff 59216.Jun 1 2016, 6:53 AM
zbuljan retitled this revision from to [mips][microMIPS] Add CodeGen support for SEL.*, SELEQZ, SELNEZ, SELEQZ.* and SELNEZ.* instructions.
zbuljan updated this object.
zbuljan added subscribers: petarj, llvm-commits.
sdardis requested changes to this revision.Jun 2 2016, 6:48 AM
sdardis edited edge metadata.

This looks good, just one change to get cmp.<op>.<format> into the instruction mapping table.

lib/Target/Mips/MicroMips32r6InstrInfo.td
847–871

You'll need to these defs or the underlying class to inherit from MipsR6Arch class to get them in the R6MMR6Rel instruction mapping table.

This revision now requires changes to proceed.Jun 2 2016, 6:48 AM
zbuljan updated this revision to Diff 60004.Jun 8 2016, 12:24 AM
zbuljan retitled this revision from [mips][microMIPS] Add CodeGen support for SEL.*, SELEQZ, SELNEZ, SELEQZ.* and SELNEZ.* instructions to [mips][microMIPS] Add CodeGen support for SEL.*, SELEQZ, SELNEZ, SELEQZ.*, SELNEZ.* and CMP.condn.fmt instructions.
zbuljan edited edge metadata.

Rebased to work with TOT.
Changed defs for MIPS32r6 CMP.condn.fmt to inherit from MipsR6Arch class.
Changed order of inheritance (R6MMR6Rel class) for microMIPS32r6 CMP.condn.fmt defs.
Updated fcmp.ll with CodeGen tests for microMIPS32r6 CMP.condn.fmt instructions.

sdardis accepted this revision.Jun 8 2016, 5:14 AM
sdardis edited edge metadata.

LGTM.

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