1 ; RUN: llc < %s -march=ppc32 -enable-ppc-preinc | \
3 ; RUN: llc < %s -march=ppc64 -enable-ppc-preinc | \
6 @Glob = global i64 4 ; <i64*> [#uses=2]
8 define i32* @test0(i32* %X, i32* %dest) {
9 %Y = getelementptr i32* %X, i32 4 ; <i32*> [#uses=2]
10 %A = load i32* %Y ; <i32> [#uses=1]
11 store i32 %A, i32* %dest
15 define i32* @test1(i32* %X, i32* %dest) {
16 %Y = getelementptr i32* %X, i32 4 ; <i32*> [#uses=2]
17 %A = load i32* %Y ; <i32> [#uses=1]
18 store i32 %A, i32* %dest
22 define i16* @test2(i16* %X, i32* %dest) {
23 %Y = getelementptr i16* %X, i32 4 ; <i16*> [#uses=2]
24 %A = load i16* %Y ; <i16> [#uses=1]
25 %B = sext i16 %A to i32 ; <i32> [#uses=1]
26 store i32 %B, i32* %dest
30 define i16* @test3(i16* %X, i32* %dest) {
31 %Y = getelementptr i16* %X, i32 4 ; <i16*> [#uses=2]
32 %A = load i16* %Y ; <i16> [#uses=1]
33 %B = zext i16 %A to i32 ; <i32> [#uses=1]
34 store i32 %B, i32* %dest
38 define i16* @test3a(i16* %X, i64* %dest) {
39 %Y = getelementptr i16* %X, i32 4 ; <i16*> [#uses=2]
40 %A = load i16* %Y ; <i16> [#uses=1]
41 %B = sext i16 %A to i64 ; <i64> [#uses=1]
42 store i64 %B, i64* %dest
46 define i64* @test4(i64* %X, i64* %dest) {
47 %Y = getelementptr i64* %X, i32 4 ; <i64*> [#uses=2]
48 %A = load i64* %Y ; <i64> [#uses=1]
49 store i64 %A, i64* %dest
53 define i16* @test5(i16* %X) {
54 %Y = getelementptr i16* %X, i32 4 ; <i16*> [#uses=2]
59 define i64* @test6(i64* %X, i64 %A) {
60 %Y = getelementptr i64* %X, i32 4 ; <i64*> [#uses=2]
65 define i64* @test7(i64* %X, i64 %A) {
66 store i64 %A, i64* @Glob