Fix a couple of the FIXMEs, thanks to suggestion from Chris. This allows
authorNate Begeman <natebegeman@mac.com>
Mon, 19 Dec 2005 23:40:42 +0000 (23:40 +0000)
committerNate Begeman <natebegeman@mac.com>
Mon, 19 Dec 2005 23:40:42 +0000 (23:40 +0000)
commit88276b887c426cf5d998b705a14663bfa38f8efd
tree257ad5f54eaa1f8550273321211e7460f15cc2a3
parent7fd1edd32e9a6782dbcd00818bbdaf82f14284a1
Fix a couple of the FIXMEs, thanks to suggestion from Chris.  This allows
us to load and store vectors directly at a pointer (offset of zero) by
using r0 as the base register.  This also requires some asm printer work
to satisfy the darwin assembler.

For
void %foo(<4 x float> * %a) {
entry:
  %tmp1 = load <4 x float> * %a;
  %tmp2 = add <4 x float> %tmp1, %tmp1
  store <4 x float> %tmp2, <4 x float> *%a
  ret void
}

We now produce:
_foo:
        lvx v0, 0, r3
        vaddfp v0, v0, v0
        stvx v0, 0, r3
        blr

Instead of:
_foo:
        li r2, 0
        lvx v0, r2, r3
        vaddfp v0, v0, v0
        stvx v0, r2, r3
        blr

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24872 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/PPCAsmPrinter.cpp
lib/Target/PowerPC/PPCISelDAGToDAG.cpp