mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-21 00:32:23 +00:00
69ccadd753
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32115 91177308-0d34-0410-b5e6-96231b3b80d8
50 lines
1.3 KiB
LLVM
50 lines
1.3 KiB
LLVM
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm &&
|
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep moveq | wc -l | grep 1 &&
|
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep movgt | wc -l | grep 1 &&
|
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep movlt | wc -l | grep 1 &&
|
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep movle | wc -l | grep 1 &&
|
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep movls | wc -l | grep 1 &&
|
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep movhi | wc -l | grep 1
|
|
|
|
int %f1(int %a) {
|
|
entry:
|
|
%tmp = seteq int %a, 4 ; <bool> [#uses=1]
|
|
%tmp1 = select bool %tmp, int 2, int 3
|
|
ret int %tmp1
|
|
}
|
|
|
|
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
|
|
}
|