mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-21 18:29:46 +00:00
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21292 91177308-0d34-0410-b5e6-96231b3b80d8
46 lines
939 B
LLVM
46 lines
939 B
LLVM
; RUN: llvm-as < %s | llc -march=ppc32 -enable-ppc-pattern-isel | not grep cmp
|
|
|
|
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) {
|
|
entry:
|
|
%tmp.1 = setlt int %a, 0
|
|
%retval = select bool %tmp.1, short %b, short 0
|
|
ret short %retval
|
|
}
|