Implement the LLVM assembly urem and srem instructions in MIPS FastISel.
Based on a patch by Reed Kotler.
LGTM. There are some comments for the big cleanup at the end of this series.
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.
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.