[PowerPC] Add loads, stores, and related things to fast-isel.
authorBill Schmidt <wschmidt@linux.vnet.ibm.com>
Fri, 30 Aug 2013 02:29:45 +0000 (02:29 +0000)
committerBill Schmidt <wschmidt@linux.vnet.ibm.com>
Fri, 30 Aug 2013 02:29:45 +0000 (02:29 +0000)
commit7248968fa529726b44d41bd25403d50c74db4bc4
treec5982d93a8af273fdbe4e2712de1e43d2e94b4af
parent6dc6a89d73c24f20caabda4cdcd9279e88658d0b
[PowerPC] Add loads, stores, and related things to fast-isel.

This is the next big chunk of fast-isel code.  The primary purpose is
to implement selection of loads and stores, but there is a lot of
drag-along to support this.  The common code to analyze addresses for
both loads and stores is substantial.  It's also necessary to add the
materialization code for global values.

Related to load-store processing is the code to fold loads into
integer extends, since otherwise we generate lots of redundant
instructions.  We also need to add some overrides to some FastEmit
routines to ensure we don't assign GPR 0 to a virtual register when
this would change the meaning of an instruction.

I added handling selection of a few binary arithmetic instructions, to
enable committing some test cases I wrote a while back.

Finally, ap couple of miscellaneous changes:
 * I cleaned up some poor style from a previous patch in
   PPCISelLowering.cpp, pointed out by David Blaikie.
 * I enlarged the Addr.Offset field to avoid sign problems with 32-bit
   offsets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189636 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/PPCFastISel.cpp
lib/Target/PowerPC/PPCISelLowering.cpp
lib/Target/PowerPC/PPCInstr64Bit.td
test/CodeGen/PowerPC/fast-isel-binary.ll [new file with mode: 0644]
test/CodeGen/PowerPC/fast-isel-fold.ll [new file with mode: 0644]
test/CodeGen/PowerPC/fast-isel-load-store.ll [new file with mode: 0644]