1 ;test all the shifted and signextending adds and subs with and without consts
3 ; RUN: llvm-as < %s | llc -march=alpha | grep ' addl' |wc -l |grep 2
4 ; RUN: llvm-as < %s | llc -march=alpha | grep ' addq' |wc -l |grep 2
5 ; RUN: llvm-as < %s | llc -march=alpha | grep ' subl' |wc -l |grep 2
6 ; RUN: llvm-as < %s | llc -march=alpha | grep ' subq' |wc -l |grep 1
7 ; RUN: llvm-as < %s | llc -march=alpha | grep 'lda $0,-100($16)' |wc -l |grep 1
9 ; RUN: llvm-as < %s | llc -march=alpha | grep 's4addl' |wc -l |grep 2
10 ; RUN: llvm-as < %s | llc -march=alpha | grep 's8addl' |wc -l |grep 2
11 ; RUN: llvm-as < %s | llc -march=alpha | grep 's4addq' |wc -l |grep 2
12 ; RUN: llvm-as < %s | llc -march=alpha | grep 's8addq' |wc -l |grep 2
14 ; RUN: llvm-as < %s | llc -march=alpha | grep 's4subl' |wc -l |grep 2
15 ; RUN: llvm-as < %s | llc -march=alpha | grep 's8subl' |wc -l |grep 2
16 ; RUN: llvm-as < %s | llc -march=alpha | grep 's4subq' |wc -l |grep 2
17 ; RUN: llvm-as < %s | llc -march=alpha | grep 's8subq' |wc -l |grep 2
19 implementation ; Functions:
21 int %al(int %x, int %y) {
23 %tmp.3 = add int %y, %x
29 %tmp.3 = add int 100, %x
33 long %aq(long %x, long %y) {
35 %tmp.3 = add long %y, %x
40 %tmp.3 = add long 100, %x
44 int %sl(int %x, int %y) {
46 %tmp.3 = sub int %y, %x
52 %tmp.3 = sub int %x, 100
56 long %sq(long %x, long %y) {
58 %tmp.3 = sub long %y, %x
63 %tmp.3 = sub long %x, 100
69 int %a4l(int %x, int %y) {
71 %tmp.1 = shl int %y, ubyte 2
72 %tmp.3 = add int %tmp.1, %x
76 int %a8l(int %x, int %y) {
78 %tmp.1 = shl int %y, ubyte 3
79 %tmp.3 = add int %tmp.1, %x
83 long %a4q(long %x, long %y) {
85 %tmp.1 = shl long %y, ubyte 2
86 %tmp.3 = add long %tmp.1, %x
90 long %a8q(long %x, long %y) {
92 %tmp.1 = shl long %y, ubyte 3
93 %tmp.3 = add long %tmp.1, %x
99 %tmp.1 = shl int %y, ubyte 2
100 %tmp.3 = add int 100, %tmp.1
106 %tmp.1 = shl int %y, ubyte 3
107 %tmp.3 = add int 100, %tmp.1
111 long %a4qi(long %y) {
113 %tmp.1 = shl long %y, ubyte 2
114 %tmp.3 = add long 100, %tmp.1
118 long %a8qi(long %y) {
120 %tmp.1 = shl long %y, ubyte 3
121 %tmp.3 = add long 100, %tmp.1
128 int %s4l(int %x, int %y) {
130 %tmp.1 = shl int %y, ubyte 2
131 %tmp.3 = sub int %tmp.1, %x
135 int %s8l(int %x, int %y) {
137 %tmp.1 = shl int %y, ubyte 3
138 %tmp.3 = sub int %tmp.1, %x
142 long %s4q(long %x, long %y) {
144 %tmp.1 = shl long %y, ubyte 2
145 %tmp.3 = sub long %tmp.1, %x
149 long %s8q(long %x, long %y) {
151 %tmp.1 = shl long %y, ubyte 3
152 %tmp.3 = sub long %tmp.1, %x
158 %tmp.1 = shl int %y, ubyte 2
159 %tmp.3 = sub int %tmp.1, 100
165 %tmp.1 = shl int %y, ubyte 3
166 %tmp.3 = sub int %tmp.1, 100
170 long %s4qi(long %y) {
172 %tmp.1 = shl long %y, ubyte 2
173 %tmp.3 = sub long %tmp.1, 100
177 long %s8qi(long %y) {
179 %tmp.1 = shl long %y, ubyte 3
180 %tmp.3 = sub long %tmp.1, 100