[PATCH] [mips][FastISel] Handle functions which return i1, i8 or i16.

Daniel Sanders daniel.sanders at imgtec.com
Wed Apr 29 03:54:32 PDT 2015


LGTM

In http://reviews.llvm.org/D6765#163069, @vkalintiris wrote:

> In http://reviews.llvm.org/D6765#162473, @dsanders wrote:
>
> > You may be able to re-use the calling convention test at test/CodeGen/Mips/cconv/return.ll if support for loads is good enough.
>
>
> 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.


================
Comment at: test/CodeGen/Mips/Fast-ISel/retabi.ll:34
@@ +33,3 @@
+; CHECK:        lw      $[[REG_S_ADDR:[0-9]+]], %got(s)($[[REG_GP]])
+; CHECK:        lhu     $[[REG_S:[0-9]+]], 0($[[REG_S_ADDR]])
+; CHECK:        jr      $ra
----------------
It's mandatory to use $2 so $[[REG_S:[0-9]+]] should check for $2 instead. Similar for the other new test cases.

http://reviews.llvm.org/D6765

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list