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

Daniel Sanders via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 28 08:51:07 PDT 2017


dsanders updated this revision to Diff 108661.
dsanders marked 3 inline comments as done.
dsanders added a comment.

Added assertion.
Added support for isImm() case.
Switched to negative number on the i32 test case.

- Fixed the issue preventing tablegen from matching either case and killed the C++ that made the test pass.
- Fixed a priority bug that was revealed after that fix. G_CONSTANT instructions need to be less important than specific constants.
  - I'm thinking that I should replace ConstantIntOperandMatcher with an appropriate instruction/opcode/literal-int matcher combination. I see no good reason for it to be special at this point. I'll leave that for another patch though.


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.108661.patch
Type: text/x-patch
Size: 18877 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170728/6f18296c/attachment.bin>


More information about the llvm-commits mailing list