[PATCH] D21473: [mips] Fix aui/daui/dahi/dati for MIPSR6

Daniel Sanders via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 1 04:10:43 PDT 2016


dsanders added inline comments.

================
Comment at: lib/Target/Mips/MicroMips64r6InstrInfo.td:84-88
@@ -85,1 +83,7 @@
+  string AsmString = !strconcat(instr_asm, "\t$rs, $rt, $imm");
+  // FIXME:
+  // Notionally this instruction has the constraint "$rs = $rt",
+  // but that hides bad code from the MipsAsmParser::checkTargetMatchPredicate
+  // as the instruction is instantiated with the second operand as a clone
+  // of the first.
 }
----------------
I think we need to split this out into a separate issue. I'm not very keen on the idea of working around a bug in the way tablegen handles tied operands, especially given that the workaround will prevent us from adding CodeGen support.

As you mention in the comment, the issue is that CVT_Tied is implemented such that it copies the MCOperand that this operand is tied to without checking if the current operand would render to the same thing. As a result, the matcher silently ignores bad input and emits a valid instruction that isn't what the user specified. It should error out instead.

I'll see if I can find a way to fix tablegen.


Repository:
  rL LLVM

http://reviews.llvm.org/D21473





More information about the llvm-commits mailing list