blob: ca79e49829a2c5f29bb46188757a563534b37a8e [file] [log] [blame]
Rafael Espindola0a200602006-09-08 17:36:23 +00001; RUN: llvm-as < %s | llc -march=arm &&
2; RUN: llvm-as < %s | llc -march=arm | grep and | wc -l | grep 1 &&
3; RUN: llvm-as < %s | llc -march=arm | grep orr | wc -l | grep 1 &&
4; RUN: llvm-as < %s | llc -march=arm | grep eor | wc -l | grep 1 &&
5; RUN: llvm-as < %s | llc -march=arm | grep mov.*lsl | wc -l | grep 1 &&
6; RUN: llvm-as < %s | llc -march=arm | grep mov.*asr | wc -l | grep 1
7
8int %f1(int %a, int %b) {
9entry:
10 %tmp2 = and int %b, %a ; <int> [#uses=1]
11 ret int %tmp2
12}
13
14int %f2(int %a, int %b) {
15entry:
16 %tmp2 = or int %b, %a ; <int> [#uses=1]
17 ret int %tmp2
18}
19
20int %f3(int %a, int %b) {
21entry:
22 %tmp2 = xor int %b, %a ; <int> [#uses=1]
23 ret int %tmp2
24}
25
26int %f4(int %a, ubyte %b) {
27entry:
28 %tmp3 = shl int %a, ubyte %b ; <int> [#uses=1]
29 ret int %tmp3
30}
31
32int %f5(int %a, ubyte %b) {
33entry:
34 %tmp3 = shr int %a, ubyte %b ; <int> [#uses=1]
35 ret int %tmp3
36}