[PATCH] D100788: [SystemZ] Support i128 inline asm operands

Jonas Paulsson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 27 08:25:45 PDT 2021


jonpa updated this revision to Diff 340855.
jonpa added reviewers: niravd, eli.friedman, craig.topper, vhscampos.
jonpa added a comment.

Patch updated (NFC).

- No need to pass the original Value to splitValueIntoRegisterParts()/joinRegisterPartsIntoValue() to detect the inline-asm case. However, this is still reached for normal calls where the i128 argument has been expanded to 2 x i64 parts, so need to check NumParts argument and do nothing in those cases (for example test/CodeGen/SystemZ/args-09.ll).

- I tried to instead of adding a new hook "getNumRegistersForInlineAsmOp()" (per previous version of patch), pass RC to getNumRegisters() as an optional argument. This can instead be used by target to do an override. I am not quite sure this is preferred: in contrast to calling a separate new hook that puts this in a clear context, this is made general and it requires a (tiny) bit more work in SelectionDAGBuilder of passing the RegisterClass along. Perhaps an alternative would be to return this from getRegForInlineAsmConstraint() and that way have the assigned register, the register class and numparts declared there in one place..?

- I tried to reuse the register class for a tied operand in visitInlineAsm(), but that turned out to fail in cases where the def is a specific physreg, in which case there is no regclass specified...


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

https://reviews.llvm.org/D100788

Files:
  llvm/include/llvm/CodeGen/TargetLowering.h
  llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
  llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
  llvm/lib/Target/SystemZ/SystemZISelLowering.h
  llvm/test/CodeGen/SystemZ/inline-asm-i128.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100788.340855.patch
Type: text/x-patch
Size: 13330 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210427/6e087aa2/attachment.bin>


More information about the llvm-commits mailing list