This is an archive of the discontinued LLVM Phabricator instance.

[mips] divide macro instruction cleanup.
ClosedPublic

Authored by sdardis on Feb 13 2017, 3:24 AM.

Details

Summary

Clean up the implementation of divide macro expansion by getting rid of a
FIXME regarding magic numbers and branch instructions. Match GAS' behaviour
for expansion of ddiv / div in the two and three operand cases. Add the two
operand alias for MIPSR6. Finally, optimize macro expansion cases where the
divisior is the $zero register.

Diff Detail

Repository
rL LLVM

Event Timeline

sdardis created this revision.Feb 13 2017, 3:24 AM
slthakur accepted this revision.Feb 13 2017, 7:13 AM

LGTM with minor nits.

lib/Target/Mips/AsmParser/MipsAsmParser.cpp
3416 ↗(On Diff #88176)

Should this be like -> "Notably we don't have to emit a warning when encountering $rt as the $zero register"?

3419 ↗(On Diff #88176)

Could you please rephrase this statement so that it is clear to understand?

This revision is now accepted and ready to land.Feb 13 2017, 7:13 AM
This revision was automatically updated to reflect the committed changes.
sdardis marked 2 inline comments as done.