diff options
author | Chris Lattner <sabre@nondot.org> | 2006-11-16 01:22:52 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-11-16 01:22:52 +0000 |
commit | 027f388ab8aa509e5614168d451150def8765b3c (patch) | |
tree | 14e752d34a5b1348f26f9e65aebb82c4ecd50179 /test/CodeGen/PowerPC | |
parent | 0403862158a5a908b868b0b64b7725b39919a506 (diff) |
make this harder
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31779 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/PowerPC')
-rw-r--r-- | test/CodeGen/PowerPC/mem_update.ll | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/CodeGen/PowerPC/mem_update.ll b/test/CodeGen/PowerPC/mem_update.ll index 16917c0516a..935740643fe 100644 --- a/test/CodeGen/PowerPC/mem_update.ll +++ b/test/CodeGen/PowerPC/mem_update.ll @@ -2,6 +2,7 @@ ; RUN: llvm-as < %s | llc -march=ppc32 -enable-ppc-preinc | not grep addi && ; RUN: llvm-as < %s | llc -march=ppc64 -enable-ppc-preinc && ; RUN: llvm-as < %s | llc -march=ppc64 -enable-ppc-preinc | not grep addi +%Glob = global ulong 4 int *%test0(int *%X, int *%dest) { %Y = getelementptr int* %X, int 4 @@ -33,6 +34,13 @@ ushort *%test3(ushort *%X, int *%dest) { ret ushort* %Y } +short *%test3a(short *%X, long *%dest) { + %Y = getelementptr short* %X, int 4 + %A = load short* %Y + %B = cast short %A to long + store long %B, long* %dest + ret short* %Y +} long *%test4(long *%X, long *%dest) { %Y = getelementptr long* %X, int 4 @@ -40,3 +48,21 @@ long *%test4(long *%X, long *%dest) { store long %A, long* %dest ret long* %Y } + +ushort *%test5(ushort *%X) { + %Y = getelementptr ushort* %X, int 4 + store ushort 7, ushort* %Y + ret ushort* %Y +} + +ulong *%test6(ulong *%X, ulong %A) { + %Y = getelementptr ulong* %X, int 4 + store ulong %A, ulong* %Y + ret ulong* %Y +} + +ulong *%test7(ulong *%X, ulong %A) { + store ulong %A, ulong* %Glob + ret ulong *%Glob +} + |