summaryrefslogtreecommitdiff
path: root/test/CodeGen/Alpha/cmov.ll
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2009-06-02 17:52:33 +0000
committerEd Schouten <ed@FreeBSD.org>2009-06-02 17:52:33 +0000
commit009b1c42aa6266385f2c37e227516b24077e6dd7 (patch)
tree64ba909838c23261cace781ece27d106134ea451 /test/CodeGen/Alpha/cmov.ll
Diffstat (limited to 'test/CodeGen/Alpha/cmov.ll')
-rw-r--r--test/CodeGen/Alpha/cmov.ll23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/CodeGen/Alpha/cmov.ll b/test/CodeGen/Alpha/cmov.ll
new file mode 100644
index 0000000000000..08e1dad2c0e77
--- /dev/null
+++ b/test/CodeGen/Alpha/cmov.ll
@@ -0,0 +1,23 @@
+; RUN: llvm-as < %s | llc -march=alpha | not grep cmovlt
+; RUN: llvm-as < %s | llc -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
+}