[PATCH] D19906: [mips][microMIPS] Implement SLT, SLTI, SLTIU, SLTU microMIPS32r6 instructions
Simon Dardis via llvm-commits
llvm-commits at lists.llvm.org
Thu May 5 05:07:38 PDT 2016
sdardis requested changes to this revision.
sdardis added a comment.
This revision now requires changes to proceed.
Some nits. Can you extend the rest of the set*.ll tests?
================
Comment at: lib/Target/Mips/MicroMipsInstrInfo.td:1009
@@ -1005,1 +1008,3 @@
+defm : SetgePats<GPR32, SLT_MM, SLTu_MM>;
+
//===----------------------------------------------------------------------===//
----------------
The SetgeImmPats patterns can be included for microMIPS if you extend that parameter list to include XOR_MM like the SeqeqPats patterns.
================
Comment at: lib/Target/Mips/MicroMipsInstrInfo.td:1047
@@ -1040,2 +1046,3 @@
+ (SLTi_MM GPR32Opnd:$rs, GPR32Opnd:$rt, simm16:$imm), 0>;
def : MipsInstAlias<"sll $rd, $rt, $rs",
(SLLV_MM GPR32Opnd:$rd, GPR32Opnd:$rt, GPR32Opnd:$rs), 0>;
----------------
Also include the "sltu $rs, $rt, $imm" alias.
================
Comment at: lib/Target/Mips/MipsInstrInfo.td:2189-2191
@@ -2185,3 +2188,4 @@
+}
def : MipsInstAlias<
"sltu $rt, $rs, $imm",
(SLTiu GPR32Opnd:$rt, GPR32Opnd:$rs, simm32_relaxed:$imm), 0>;
----------------
This alias should be included in [NotinMicroMips].
================
Comment at: lib/Target/Mips/MipsInstrInfo.td:2576
@@ -2570,2 +2575,3 @@
+}
defm : SetgeImmPats<GPR32, SLTi, SLTiu>;
----------------
See my above comment on extending SetgeImmPats.
================
Comment at: test/CodeGen/Mips/slt.ll:4
@@ +3,3 @@
+define i32 @slt(i32 signext %a) nounwind readnone {
+ %1 = icmp slt i32 %a, 7
+ %2 = select i1 %1, i32 3, i32 4
----------------
Use a CHECK-LABEL: to match the function here, and write a CHECK line that matches slt taking $4 as one of it operands as its an argument register or just "CHECK: slt".
================
Comment at: test/CodeGen/Mips/slt.ll:9
@@ +8,3 @@
+
+define i32 @sgt(i32 signext %a) {
+entry:
----------------
Same here.
http://reviews.llvm.org/D19906
More information about the llvm-commits
mailing list