blob: 9b655f03efdcf2bd8dc02d2f0ac9409d0f3eed2d [file] [log] [blame]
Dan Gohmanfce288f2009-09-09 00:09:15 +00001; RUN: llc < %s -march=alpha | not grep cmovlt
2; RUN: llc < %s -march=alpha | grep cmoveq
Andrew Lenharth06443092007-04-17 04:07:27 +00003
Tanya Lattner53a66d12008-02-19 01:41:04 +00004define i64 @cmov_lt(i64 %a, i64 %c) {
Andrew Lenharth10d7f9a2006-02-01 19:36:52 +00005entry:
Tanya Lattner53a66d12008-02-19 01:41:04 +00006 %tmp.1 = icmp slt i64 %c, 0 ; <i1> [#uses=1]
7 %retval = select i1 %tmp.1, i64 %a, i64 10 ; <i64> [#uses=1]
8 ret i64 %retval
Andrew Lenharth10d7f9a2006-02-01 19:36:52 +00009}
10
Tanya Lattner53a66d12008-02-19 01:41:04 +000011define i64 @cmov_const(i64 %a, i64 %b, i64 %c) {
Andrew Lenharth10d7f9a2006-02-01 19:36:52 +000012entry:
Tanya Lattner53a66d12008-02-19 01:41:04 +000013 %tmp.1 = icmp slt i64 %a, %b ; <i1> [#uses=1]
14 %retval = select i1 %tmp.1, i64 %c, i64 10 ; <i64> [#uses=1]
15 ret i64 %retval
Andrew Lenharth10d7f9a2006-02-01 19:36:52 +000016}
17
Tanya Lattner53a66d12008-02-19 01:41:04 +000018define i64 @cmov_lt2(i64 %a, i64 %c) {
Andrew Lenharth0ddae492006-09-20 15:04:55 +000019entry:
Tanya Lattner53a66d12008-02-19 01:41:04 +000020 %tmp.1 = icmp sgt i64 %c, 0 ; <i1> [#uses=1]
21 %retval = select i1 %tmp.1, i64 10, i64 %a ; <i64> [#uses=1]
22 ret i64 %retval
Andrew Lenharth0ddae492006-09-20 15:04:55 +000023}