diff options
Diffstat (limited to 'test/CodeGen/PTX/add.ll')
-rw-r--r-- | test/CodeGen/PTX/add.ll | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/CodeGen/PTX/add.ll b/test/CodeGen/PTX/add.ll new file mode 100644 index 000000000000..1259d03e96c9 --- /dev/null +++ b/test/CodeGen/PTX/add.ll @@ -0,0 +1,15 @@ +; RUN: llc < %s -march=ptx | FileCheck %s + +define ptx_device i32 @t1(i32 %x, i32 %y) { +; CHECK: add.s32 r0, r1, r2; + %z = add i32 %x, %y +; CHECK: ret; + ret i32 %z +} + +define ptx_device i32 @t2(i32 %x) { +; CHECK: add.s32 r0, r1, 1; + %z = add i32 %x, 1 +; CHECK: ret; + ret i32 %z +} |