1 ; RUN: llvm-as < %s | llc -march=systemz | FileCheck %s
3 define i32 @foo1(i32 %a, i32 *%b, i64 %idx) signext {
5 ; CHECK: a %r2, 4(%r1,%r3)
7 %idx2 = add i64 %idx, 1 ; <i64> [#uses=1]
8 %ptr = getelementptr i32* %b, i64 %idx2 ; <i32*> [#uses=1]
14 define i32 @foo2(i32 %a, i32 *%b, i64 %idx) signext {
16 ; CHECK: ay %r2, -4(%r1,%r3)
18 %idx2 = add i64 %idx, -1 ; <i64> [#uses=1]
19 %ptr = getelementptr i32* %b, i64 %idx2 ; <i32*> [#uses=1]
25 define i64 @foo3(i64 %a, i64 *%b, i64 %idx) signext {
27 ; CHECK: ag %r2, 8(%r1,%r3)
29 %idx2 = add i64 %idx, 1 ; <i64> [#uses=1]
30 %ptr = getelementptr i64* %b, i64 %idx2 ; <i64*> [#uses=1]
36 define i32 @foo4(i32 %a, i32 *%b, i64 %idx) signext {
38 ; CHECK: n %r2, 4(%r1,%r3)
40 %idx2 = add i64 %idx, 1 ; <i64> [#uses=1]
41 %ptr = getelementptr i32* %b, i64 %idx2 ; <i32*> [#uses=1]
47 define i32 @foo5(i32 %a, i32 *%b, i64 %idx) signext {
49 ; CHECK: ny %r2, -4(%r1,%r3)
51 %idx2 = add i64 %idx, -1 ; <i64> [#uses=1]
52 %ptr = getelementptr i32* %b, i64 %idx2 ; <i32*> [#uses=1]
58 define i64 @foo6(i64 %a, i64 *%b, i64 %idx) signext {
60 ; CHECK: ng %r2, 8(%r1,%r3)
62 %idx2 = add i64 %idx, 1 ; <i64> [#uses=1]
63 %ptr = getelementptr i64* %b, i64 %idx2 ; <i64*> [#uses=1]
69 define i32 @foo7(i32 %a, i32 *%b, i64 %idx) signext {
71 ; CHECK: o %r2, 4(%r1,%r3)
73 %idx2 = add i64 %idx, 1 ; <i64> [#uses=1]
74 %ptr = getelementptr i32* %b, i64 %idx2 ; <i32*> [#uses=1]
80 define i32 @foo8(i32 %a, i32 *%b, i64 %idx) signext {
82 ; CHECK: oy %r2, -4(%r1,%r3)
84 %idx2 = add i64 %idx, -1 ; <i64> [#uses=1]
85 %ptr = getelementptr i32* %b, i64 %idx2 ; <i32*> [#uses=1]
91 define i64 @foo9(i64 %a, i64 *%b, i64 %idx) signext {
93 ; CHECK: og %r2, 8(%r1,%r3)
95 %idx2 = add i64 %idx, 1 ; <i64> [#uses=1]
96 %ptr = getelementptr i64* %b, i64 %idx2 ; <i64*> [#uses=1]
102 define i32 @foo10(i32 %a, i32 *%b, i64 %idx) signext {
104 ; CHECK: x %r2, 4(%r1,%r3)
106 %idx2 = add i64 %idx, 1 ; <i64> [#uses=1]
107 %ptr = getelementptr i32* %b, i64 %idx2 ; <i32*> [#uses=1]
113 define i32 @foo11(i32 %a, i32 *%b, i64 %idx) signext {
115 ; CHECK: xy %r2, -4(%r1,%r3)
117 %idx2 = add i64 %idx, -1 ; <i64> [#uses=1]
118 %ptr = getelementptr i32* %b, i64 %idx2 ; <i32*> [#uses=1]
124 define i64 @foo12(i64 %a, i64 *%b, i64 %idx) signext {
126 ; CHECK: xg %r2, 8(%r1,%r3)
128 %idx2 = add i64 %idx, 1 ; <i64> [#uses=1]
129 %ptr = getelementptr i64* %b, i64 %idx2 ; <i64*> [#uses=1]