This is an archive of the discontinued LLVM Phabricator instance.

[mips][microMIPS] Add CodeGen support for microMIPSr6 ROTR and ROTRV and add tests for LL, SC, SYSCALL, ROTR, ROTRV, LWM32, SWM32 and MOVEP instructions
ClosedPublic

Authored by zbuljan on May 3 2016, 12:08 AM.

Details

Summary

The patch adds CodeGen support for microMIPSr6 ROTR and ROTRV instructions and also adds the standard tests for existing microMIPS LL, SC, SYSCALL, ROTR, ROTRV, LWM32, SWM32 and MOVEP instruction definitions:

  • separated microMIPS LL, SC, ROTR and ROTRV instructions from equivalent MIPS instructions using NotInMicroMips predicate
  • added alias definitions for ROTR and SYSCALL instructions
  • added DAG patterns to description classes for proper selection of ROTR and ROTRV instructions
  • updated isMovePRegPair() method (MipsAsmParser.cpp) for MOVEP instruction
  • updated CodeGen tests for microMIPSr6 (rotate.ll)
  • added tests for the standard encodings
  • added invalid tests

There was a problem with commit rL266977 of the previous patch D19150.
Test-suite failed with error message:

fatal error: error in backend: Cannot select: t17: i32 = rotr t2, t11
...

The problem was with selecting microMIPS ROTR and ROTRV instructions in LLVM backend.
For that reason I decided to revert commit rL266977 and make this patch which besides standard regression tests also includes CodeGen support for ROTR and ROTRV instructions.

Diff Detail

Repository
rL LLVM

Event Timeline

zbuljan updated this revision to Diff 55951.May 3 2016, 12:08 AM
zbuljan retitled this revision from to [mips][microMIPS] Add CodeGen support for microMIPSr6 ROTR and ROTRV and add tests for LL, SC, SYSCALL, ROTR, ROTRV, LWM32, SWM32 and MOVEP instructions.
zbuljan updated this object.
zbuljan added subscribers: petarj, llvm-commits.
sdardis accepted this revision.May 3 2016, 2:57 AM
sdardis edited edge metadata.

LGTM. Apologies, I should have caught the failure to select rotr.

This revision is now accepted and ready to land.May 3 2016, 2:57 AM
This revision was automatically updated to reflect the committed changes.