Change some PowerPC PatLeaf definitions to ImmLeaf for fast-isel.
authorBill Schmidt <wschmidt@linux.vnet.ibm.com>
Wed, 22 May 2013 20:09:24 +0000 (20:09 +0000)
committerBill Schmidt <wschmidt@linux.vnet.ibm.com>
Wed, 22 May 2013 20:09:24 +0000 (20:09 +0000)
commit5cd01f74b11dc3e1c08c3ddea067af8203079b87
tree79027122ee83f90f58af25e34b2493a9fd6bd587
parent3f75c6cfb575917c8c112b2de9593cb860f79e56
Change some PowerPC PatLeaf definitions to ImmLeaf for fast-isel.

Using PatLeaf rather than ImmLeaf when defining immediate predicates
prevents simple patterns using those predicates from being recognized
for fast instruction selection.  This patch replaces the immSExt16
PatLeaf predicate with two ImmLeaf predicates, imm32SExt16 and
imm64SExt16, allowing a few more patterns to be recognized (ADDI,
ADDIC, MULLI, ADDI8, and ADDIC8).  Using the new predicates does not
help for LI, LI8, SUBFIC, and SUBFIC8 because these are rejected for
other reasons, but I see no reason to retain the PatLeaf predicate.

No functional change intended, and thus no test cases yet.  This is
preliminary work for enabling fast-isel support for PowerPC.  When
that support is ready, we'll be able to test this function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182510 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/PPCInstr64Bit.td
lib/Target/PowerPC/PPCInstrInfo.td