[PATCH] D60528: [RISCV] Diagnose invalid second input register operand when using %tprel_add

Alex Bradbury via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 11 04:08:26 PDT 2019


asb added a comment.

Good catch Roger, thanks! This looks good to me, though I wonder if it's worth being a bit more explicit in the checkPseudoAddTPRel comment.



================
Comment at: lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp:101
+  // Currently we can't give a meaningful diagnostic if we enforce this
+  // constraint earlier.
+  bool checkPseudoAddTPRel(MCInst &Inst, OperandVector &Operands);
----------------
I'd consider incorporating more of the reasoning from your commit message here, so it's more self-documenting. e.g. "Enforcing this using a restricted register class for the second input operand of PseudoAddTPRel results in a poor diagnostic due to the fact 'add' is an overloaded mnemonic."


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60528/new/

https://reviews.llvm.org/D60528





More information about the llvm-commits mailing list