Add test case mov.ll for PTX device function
authorChe-Liang Chiou <clchiou@gmail.com>
Tue, 19 Oct 2010 13:21:51 +0000 (13:21 +0000)
committerChe-Liang Chiou <clchiou@gmail.com>
Tue, 19 Oct 2010 13:21:51 +0000 (13:21 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116806 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGen/PTX/mov.ll [new file with mode: 0644]

diff --git a/test/CodeGen/PTX/mov.ll b/test/CodeGen/PTX/mov.ll
new file mode 100644 (file)
index 0000000..287b846
--- /dev/null
@@ -0,0 +1,13 @@
+; RUN: llc < %s -march=ptx | FileCheck %s
+
+define ptx_device i32 @t1() {
+;CHECK: mov.s32 r0, 0;
+;CHECK: ret;
+       ret i32 0
+}
+
+define ptx_device i32 @t2(i32 %x) {
+;CHECK: mov.s32 r0, r1;
+;CHECK: ret;
+       ret i32 %x
+}