Page MenuHomePhabricator

[mips][FastISel] Implement srem and urem.
AbandonedPublic

Authored by vkalintiris on Jan 16 2015, 5:53 PM.

Details

Summary

Implement the LLVM assembly urem and srem instructions in MIPS FastISel.

Based on a patch by Reed Kotler.

Diff Detail

Event Timeline

rkotler updated this revision to Diff 18330.Jan 16 2015, 5:53 PM
rkotler retitled this revision from to Implement srem, urem in Mips fast-isel.
rkotler updated this object.
rkotler edited the test plan for this revision. (Show Details)
rkotler added a reviewer: dsinclair.
rkotler added subscribers: rfuhler, Unknown Object (MLST).
vkalintiris commandeered this revision.Apr 16 2015, 5:47 AM
vkalintiris added a reviewer: rkotler.
dsanders accepted this revision.May 12 2015, 5:06 AM
dsanders edited edge metadata.

LGTM. There are some comments for the big cleanup at the end of this series.

lib/Target/Mips/MipsFastISel.cpp
1429–1430

The generated code is valid for all integers <=32-bit so long as operands are sign/zero extended properly by all relevant instructions.

I don't think we can guarantee that so this is something for the big cleanup once we've finished this set of patches.

test/CodeGen/Mips/Fast-ISel/rem1.ll
15

As mentioned in D6774, we can significantly simplify this using arguments and returns.

As noted there, I don't mind if this is part of the big cleanup.

59–100

Unnecessary

This revision is now accepted and ready to land.May 12 2015, 5:06 AM
vkalintiris retitled this revision from Implement srem, urem in Mips fast-isel to [mips][FastISel] Implement srem and urem..
vkalintiris updated this object.
vkalintiris edited edge metadata.

Rebased patch to top-of-tree and cleaned up the tests.

vkalintiris abandoned this revision.Jun 1 2015, 9:25 AM

Abandoned this patch because it's functionality was merged in D7028 and committed in r238757.