[PATCH] D44304: [MIPS GlobalISel] Select add i32, i32

Daniel Sanders via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 11 08:19:01 PDT 2018


dsanders added inline comments.


================
Comment at: test/CodeGen/Mips/GlobalISel/instruction-select/add.mir:5
+
+  define void @add_i32(i32 %x, i32 %y) {entry: ret void}
+
----------------
sdardis wrote:
> This IR doesn't match the MIR below.
> 
> This function takes two parameters, but doesn't return anything or perform any computation.
> 
> The MIR below does the trivial add two parameters and return the result.
That's actually fine. MIR mostly only cares about the prototype and having declarations for memory objects. You can often delete everything from the '--- |' to the '...'


================
Comment at: test/CodeGen/Mips/GlobalISel/instruction-select/add.mir:14-17
+registers:
+  - { id: 0, class: gprb }
+  - { id: 1, class: gprb }
+  - { id: 2, class: gprb }
----------------
... which reminds me. You can probably delete this 'registers' section too so long as the constraints are defined inline in the body which they appear to be


Repository:
  rL LLVM

https://reviews.llvm.org/D44304





More information about the llvm-commits mailing list