2006-09-21 13:06:26 +00:00
|
|
|
; RUN: llvm-as < %s | llc -march=arm &&
|
|
|
|
; RUN: llvm-as < %s | llc -march=arm | grep moveq | wc -l | grep 1 &&
|
|
|
|
; RUN: llvm-as < %s | llc -march=arm | grep movgt | wc -l | grep 1 &&
|
|
|
|
; RUN: llvm-as < %s | llc -march=arm | grep movlt | wc -l | grep 1 &&
|
|
|
|
; RUN: llvm-as < %s | llc -march=arm | grep movle | wc -l | grep 1 &&
|
|
|
|
; RUN: llvm-as < %s | llc -march=arm | grep movls | wc -l | grep 1 &&
|
|
|
|
; RUN: llvm-as < %s | llc -march=arm | grep movhi | wc -l | grep 1
|
2006-08-22 06:43:24 +00:00
|
|
|
|
2006-09-21 13:06:26 +00:00
|
|
|
int %f1(int %a) {
|
2006-08-21 22:00:32 +00:00
|
|
|
entry:
|
|
|
|
%tmp = seteq int %a, 4 ; <bool> [#uses=1]
|
2006-09-08 12:52:50 +00:00
|
|
|
%tmp1 = select bool %tmp, int 2, int 3
|
|
|
|
ret int %tmp1
|
2006-08-21 22:00:32 +00:00
|
|
|
}
|
2006-09-21 13:06:26 +00:00
|
|
|
|
|
|
|
int %f2(int %a) {
|
|
|
|
entry:
|
|
|
|
%tmp = setgt int %a, 4 ; <bool> [#uses=1]
|
|
|
|
%tmp1 = select bool %tmp, int 2, int 3
|
|
|
|
ret int %tmp1
|
|
|
|
}
|
|
|
|
|
|
|
|
int %f3(int %a, int %b) {
|
|
|
|
entry:
|
|
|
|
%tmp = setlt int %a, %b ; <bool> [#uses=1]
|
|
|
|
%tmp1 = select bool %tmp, int 2, int 3
|
|
|
|
ret int %tmp1
|
|
|
|
}
|
|
|
|
|
|
|
|
int %f4(int %a, int %b) {
|
|
|
|
entry:
|
|
|
|
%tmp = setle int %a, %b ; <bool> [#uses=1]
|
|
|
|
%tmp1 = select bool %tmp, int 2, int 3
|
|
|
|
ret int %tmp1
|
|
|
|
}
|
|
|
|
|
|
|
|
int %f5(uint %a, uint %b) {
|
|
|
|
entry:
|
|
|
|
%tmp = setle uint %a, %b ; <bool> [#uses=1]
|
|
|
|
%tmp1 = select bool %tmp, int 2, int 3
|
|
|
|
ret int %tmp1
|
|
|
|
}
|
|
|
|
|
|
|
|
int %f6(uint %a, uint %b) {
|
|
|
|
entry:
|
|
|
|
%tmp = setgt uint %a, %b ; <bool> [#uses=1]
|
|
|
|
%tmp1 = select bool %tmp, int 2, int 3
|
|
|
|
ret int %tmp1
|
|
|
|
}
|