diff options
author | Che-Liang Chiou <clchiou@gmail.com> | 2011-03-18 11:08:52 +0000 |
---|---|---|
committer | Che-Liang Chiou <clchiou@gmail.com> | 2011-03-18 11:08:52 +0000 |
commit | 88d3367baa066b4924a9303291aee084c154fff1 (patch) | |
tree | b9f5248897f67abbcb6e01a981eb95af18543426 /test/CodeGen/PTX | |
parent | d4f4e6ee2c1eb80b8a1d3199e7747405fee956a3 (diff) | |
download | external_llvm-88d3367baa066b4924a9303291aee084c154fff1.zip external_llvm-88d3367baa066b4924a9303291aee084c154fff1.tar.gz external_llvm-88d3367baa066b4924a9303291aee084c154fff1.tar.bz2 |
ptx: add unconditional and conditional branch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127873 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/PTX')
-rw-r--r-- | test/CodeGen/PTX/bra.ll | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/CodeGen/PTX/bra.ll b/test/CodeGen/PTX/bra.ll new file mode 100644 index 0000000..0791697 --- /dev/null +++ b/test/CodeGen/PTX/bra.ll @@ -0,0 +1,21 @@ +; RUN: llc < %s -march=ptx | FileCheck %s + +define ptx_device void @test_bra_direct() { +; CHECK: bra $L__BB0_1; +entry: + br label %loop +loop: + br label %loop +} + +define ptx_device i32 @test_bra_cond_direct(i32 %x, i32 %y) { +entry: + %p = icmp ugt i32 %x, %y + br i1 %p, label %clause.if, label %clause.else +clause.if: +; CHECK: mov.u32 r0, r1 + ret i32 %x +clause.else: +; CHECK: mov.u32 r0, r2 + ret i32 %y +} |