aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/Alpha/cmov.ll
blob: 9b655f03efdcf2bd8dc02d2f0ac9409d0f3eed2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
; 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
}