2009-09-09 00:09:15 +00:00
|
|
|
; RUN: llc < %s -march=alpha | not grep cmovlt
|
|
|
|
; RUN: llc < %s -march=alpha | grep cmoveq
|
2007-04-17 04:07:27 +00:00
|
|
|
|
2008-02-19 01:41:04 +00:00
|
|
|
define i64 @cmov_lt(i64 %a, i64 %c) {
|
2006-02-01 19:36:52 +00:00
|
|
|
entry:
|
2008-02-19 01:41:04 +00:00
|
|
|
%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
|
2006-02-01 19:36:52 +00:00
|
|
|
}
|
|
|
|
|
2008-02-19 01:41:04 +00:00
|
|
|
define i64 @cmov_const(i64 %a, i64 %b, i64 %c) {
|
2006-02-01 19:36:52 +00:00
|
|
|
entry:
|
2008-02-19 01:41:04 +00:00
|
|
|
%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
|
2006-02-01 19:36:52 +00:00
|
|
|
}
|
|
|
|
|
2008-02-19 01:41:04 +00:00
|
|
|
define i64 @cmov_lt2(i64 %a, i64 %c) {
|
2006-09-20 15:04:55 +00:00
|
|
|
entry:
|
2008-02-19 01:41:04 +00:00
|
|
|
%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
|
2006-09-20 15:04:55 +00:00
|
|
|
}
|