summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorChe-Liang Chiou <clchiou@gmail.com>2011-03-18 11:23:56 +0000
committerChe-Liang Chiou <clchiou@gmail.com>2011-03-18 11:23:56 +0000
commit8902ecb6826d0677c32f1fb9aac41070fee1ac7d (patch)
treea090b42e2664203411cd7769f02b7639beb93bef /test
parent88d3367baa066b4924a9303291aee084c154fff1 (diff)
ptx: fix parameter order that is reversed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127874 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CodeGen/PTX/parameter-order.ll8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/CodeGen/PTX/parameter-order.ll b/test/CodeGen/PTX/parameter-order.ll
new file mode 100644
index 0000000000..dbbbb67a14
--- /dev/null
+++ b/test/CodeGen/PTX/parameter-order.ll
@@ -0,0 +1,8 @@
+; RUN: llc < %s -march=ptx | FileCheck %s
+
+; CHECK: .func (.reg .u32 r0) test_parameter_order (.reg .u32 r1, .reg .u32 r2)
+define ptx_device i32 @test_parameter_order(i32 %x, i32 %y) {
+; CHECK: sub.u32 r0, r1, r2
+ %z = sub i32 %x, %y
+ ret i32 %z
+}