mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-26 21:32:10 +00:00
fce288fc91
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81293 91177308-0d34-0410-b5e6-96231b3b80d8
24 lines
759 B
LLVM
24 lines
759 B
LLVM
; RUN: llc < %s -march=alpha | not grep cmovlt
|
|
; RUN: llc < %s -march=alpha | grep cmoveq
|
|
|
|
define i64 @cmov_lt(i64 %a, i64 %c) {
|
|
entry:
|
|
%tmp.1 = icmp slt i64 %c, 0 ; <i1> [#uses=1]
|
|
%retval = select i1 %tmp.1, i64 %a, i64 10 ; <i64> [#uses=1]
|
|
ret i64 %retval
|
|
}
|
|
|
|
define i64 @cmov_const(i64 %a, i64 %b, i64 %c) {
|
|
entry:
|
|
%tmp.1 = icmp slt i64 %a, %b ; <i1> [#uses=1]
|
|
%retval = select i1 %tmp.1, i64 %c, i64 10 ; <i64> [#uses=1]
|
|
ret i64 %retval
|
|
}
|
|
|
|
define i64 @cmov_lt2(i64 %a, i64 %c) {
|
|
entry:
|
|
%tmp.1 = icmp sgt i64 %c, 0 ; <i1> [#uses=1]
|
|
%retval = select i1 %tmp.1, i64 10, i64 %a ; <i64> [#uses=1]
|
|
ret i64 %retval
|
|
}
|