[PATCH] D35833: [globalisel][tablegen] Add support for importing 'imm' operands.

Daniel Sanders via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 31 07:02:42 PDT 2017


dsanders updated this revision to Diff 108917.
dsanders added a comment.

> The C++ uses ZExt but TableGen uses SExt. I haven't decided how to fix this one yet.

I've mostly deferred this problem to a later date but I have made slight tweaks
to make the zero-extension explicit by renaming GIR_CopyConstantAsImm to
GIR_CopyConstantAsUImm. It's up to tablegen to decide whether to sign-extend or
zero-extend the constant but right now it can only choose zero-extend.


https://reviews.llvm.org/D35833

Files:
  include/llvm/CodeGen/GlobalISel/InstructionSelector.h
  include/llvm/CodeGen/GlobalISel/InstructionSelectorImpl.h
  include/llvm/Target/GlobalISel/SelectionDAGCompat.td
  lib/Target/AArch64/AArch64InstructionSelector.cpp
  test/CodeGen/AArch64/GlobalISel/select-imm.mir
  test/CodeGen/X86/GlobalISel/select-inc.mir
  test/TableGen/GlobalISelEmitter.td
  utils/TableGen/GlobalISelEmitter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35833.108917.patch
Type: text/x-patch
Size: 19221 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170731/fb9ac654/attachment.bin>


More information about the llvm-commits mailing list