Allow MIPS FastISel to handle functions which return i1/i8/i16 signed/unsigned.
Type promotion should be handled by RetCC_Mips where it can be used by both Fast ISel and SelectionDAG. I suggest adding 'CCIfType<[i1, i8, i16], CCPromoteToType<i32>>' to RetCC_MipsO32.
I'll explain how to run the ABI tester to verify the change off-list.
This ought to be a test for integer types <= 32bits. For example, it's entirely possible to support i2 sign-extension to i11, or i25 zero-extension to i29. However, this will require emitIntZExt() and emitIntSExt*() to be updated to use shl/srl and shl/sra pairs, and in the case of emitIntZExt() also calculate the andi mask where appropriate.
That should be done in a later patch so no changes required at the moment.
There's not any test for FastISel outside from the test/CodeGen/Mips/Fast-ISel directory. That's why I added the tests in the Fast-ISel directory. In the future, I would like to rename the test/CodeGen/Mips/Fast-ISel/retabi.ll file to ret.ll as we check essentially for the ret IR instruction.
That's true at the moment, but in the long term I'd like to merge the ABI tests for FastISel with the ABI tests for SelectionDAG. I'd be surprised if they produce significantly different output for such simple tests.
It's mandatory to use $2 so $[[REG_S:[0-9]+]] should check for $2 instead. Similar for the other new test cases.