2006-12-02 04:23:10 +00:00
|
|
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep cmp
|
2005-04-13 21:45:13 +00:00
|
|
|
|
|
|
|
int %seli32_1(int %a) {
|
|
|
|
entry:
|
|
|
|
%tmp.1 = setlt int %a, 0
|
|
|
|
%retval = select bool %tmp.1, int 5, int 0
|
|
|
|
ret int %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
int %seli32_2(int %a, int %b) {
|
|
|
|
entry:
|
|
|
|
%tmp.1 = setlt int %a, 0
|
|
|
|
%retval = select bool %tmp.1, int %b, int 0
|
|
|
|
ret int %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
int %seli32_3(int %a, short %b) {
|
|
|
|
entry:
|
|
|
|
%tmp.2 = cast short %b to int
|
|
|
|
%tmp.1 = setlt int %a, 0
|
|
|
|
%retval = select bool %tmp.1, int %tmp.2, int 0
|
|
|
|
ret int %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
int %seli32_4(int %a, ushort %b) {
|
|
|
|
entry:
|
|
|
|
%tmp.2 = cast ushort %b to int
|
|
|
|
%tmp.1 = setlt int %a, 0
|
|
|
|
%retval = select bool %tmp.1, int %tmp.2, int 0
|
|
|
|
ret int %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
short %seli16_1(short %a) {
|
|
|
|
entry:
|
|
|
|
%tmp.1 = setlt short %a, 0
|
|
|
|
%retval = select bool %tmp.1, short 7, short 0
|
|
|
|
ret short %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
short %seli16_2(int %a, short %b) {
|
|
|
|
%tmp.1 = setlt int %a, 0
|
|
|
|
%retval = select bool %tmp.1, short %b, short 0
|
|
|
|
ret short %retval
|
|
|
|
}
|
2006-09-20 06:40:37 +00:00
|
|
|
|
|
|
|
int %seli32_a_a(int %a) {
|
|
|
|
%tmp = setlt int %a, 1
|
|
|
|
%min = select bool %tmp, int %a, int 0
|
|
|
|
ret int %min
|
|
|
|
}
|
|
|
|
|