Changes to support making the shift instructions be true BinaryOperators.
[oota-llvm.git] / test / CodeGen / ARM / bits.ll
1 ; 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
8 define i32 @f1(i32 %a, i32 %b) {
9 entry:
10         %tmp2 = and i32 %b, %a          ; <i32> [#uses=1]
11         ret i32 %tmp2
12 }
13
14 define i32 @f2(i32 %a, i32 %b) {
15 entry:
16         %tmp2 = or i32 %b, %a           ; <i32> [#uses=1]
17         ret i32 %tmp2
18 }
19
20 define i32 @f3(i32 %a, i32 %b) {
21 entry:
22         %tmp2 = xor i32 %b, %a          ; <i32> [#uses=1]
23         ret i32 %tmp2
24 }
25
26 define i32 @f4(i32 %a, i32 %b) {
27 entry:
28         %tmp3 = shl i32 %a, %b          ; <i32> [#uses=1]
29         ret i32 %tmp3
30 }
31
32 define i32 @f5(i32 %a, i32 %b) {
33 entry:
34         %tmp3 = ashr i32 %a, %b         ; <i32> [#uses=1]
35         ret i32 %tmp3
36 }