[PATCH] D61289: [globalisel] Add G_SEXT_INREG

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 3 12:39:35 PDT 2019


arsenm added inline comments.


================
Comment at: llvm/include/llvm/Target/GenericOpcodes.td:46
+  let OutOperandList = (outs type0:$dst);
+  let InOperandList = (ins type0:$src, untyped_imm_0:$sz);
+  let hasSideEffects = 0;
----------------
dsanders wrote:
> arsenm wrote:
> > Are tablegen emitter changes needed for this? I was trying to add an immediate operand in D64054, which seemed to not work correctly
> You mean the untyped_imm_0? It's needed to drive the verifier that Diana requested and tells it which immediate checks it needs to look for
Yes. As far as I can tell the emitter will try looking for G_CONSTANT defined register for this. I agree there should be a special immediate operand for this, but I don't think this will work in a tablegen pattern as-is. The current form has a ValueType leaf, so matching the immediate wouldn't be quite the same.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D61289





More information about the llvm-commits mailing list