[PATCH] D32791: [globalisel][tablegen] Add support for (set $dst, 1) and test X86's OptForSize predicate.

Daniel Sanders via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 3 03:51:23 PDT 2017


dsanders created this revision.
Herald added a subscriber: igorb.

It's rare but a small number of patterns use IntInit's at the root of the match.
On X86, one such rule is enabled by the OptForSize predicate and causes the
compiler to use the smaller:
	%0 = MOV32r1
instead of the usual:
	%0 = MOV32ri 1

This patch adds support for matching IntInit's at the root and uses this as a
test case for the optsize attribute that was implemented in r301750


https://reviews.llvm.org/D32791

Files:
  test/CodeGen/X86/GlobalISel/select-leaf-constant.mir
  test/TableGen/GlobalISelEmitter.td
  utils/TableGen/GlobalISelEmitter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32791.97586.patch
Type: text/x-patch
Size: 10473 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170503/5f679e1d/attachment.bin>


More information about the llvm-commits mailing list