[PATCH] D32491: [globalisel][tablegen] Compute available feature bits correctly.

Daniel Sanders via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 28 07:24:34 PDT 2017


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

Add support for patterns consisting solely of an IntInit* and use this to add a
test case to the rule predicate support... almost.

The new test case is currently XFAIL'ed since X86's GlobalISel gives precedence
to the C++ over the tablegenerated code. If you comment out the 'if (selectConstant(...))'
from X86InstructionSelect::select(), it passes the optsize functions but fails the
non-optsize functions (because the support is commented out). Conversely,
leaving it in causes the opposite behaviour. The optsize functions pick the
wrong insn (because C++ beats tablegen) but the non-optsize functions pass.

@rovka: If this updated patch looks good to you then I can commit it and file a
PR about the XFAIL. Otherwise I can commit the previous version and file a PR
about the missing test. Which do you think is best?


https://reviews.llvm.org/D32491

Files:
  include/llvm/CodeGen/GlobalISel/InstructionSelector.h
  include/llvm/Target/Target.td
  lib/CodeGen/GlobalISel/InstructionSelector.cpp
  lib/Target/AArch64/AArch64InstrInfo.td
  lib/Target/AArch64/AArch64InstructionSelector.cpp
  lib/Target/AArch64/AArch64Subtarget.cpp
  lib/Target/AArch64/AArch64Subtarget.h
  lib/Target/AArch64/AArch64TargetMachine.cpp
  lib/Target/X86/X86InstrInfo.td
  lib/Target/X86/X86InstructionSelector.cpp
  lib/Target/X86/X86Subtarget.cpp
  lib/Target/X86/X86Subtarget.h
  lib/Target/X86/X86TargetMachine.cpp
  test/CodeGen/X86/GlobalISel/select-inc.mir
  test/CodeGen/X86/GlobalISel/select-leaf-constant.mir
  test/TableGen/GlobalISelEmitter.td
  unittests/Target/AArch64/InstSizes.cpp
  utils/TableGen/GlobalISelEmitter.cpp
  utils/TableGen/SubtargetFeatureInfo.cpp
  utils/TableGen/SubtargetFeatureInfo.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32491.97095.patch
Type: text/x-patch
Size: 43331 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170428/00e6606c/attachment.bin>


More information about the llvm-commits mailing list