diff options
author | Akira Hatanaka <ahatanaka@mips.com> | 2013-05-21 17:13:47 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@mips.com> | 2013-05-21 17:13:47 +0000 |
commit | 1d4d32398ddb19520b2a84acae3b7807ad74602b (patch) | |
tree | 2171fef203b9498a3c8abb5c745005f7db14fcb8 /test/CodeGen/Mips | |
parent | b9c26dcb2438266567ce94570bf294d00d10cc87 (diff) | |
download | external_llvm-1d4d32398ddb19520b2a84acae3b7807ad74602b.zip external_llvm-1d4d32398ddb19520b2a84acae3b7807ad74602b.tar.gz external_llvm-1d4d32398ddb19520b2a84acae3b7807ad74602b.tar.bz2 |
[mips] Add instruction selection patterns for blez and bgez.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182396 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/Mips')
-rw-r--r-- | test/CodeGen/Mips/blez_bgez.ll | 36 | ||||
-rw-r--r-- | test/CodeGen/Mips/brdelayslot.ll | 2 |
2 files changed, 37 insertions, 1 deletions
diff --git a/test/CodeGen/Mips/blez_bgez.ll b/test/CodeGen/Mips/blez_bgez.ll new file mode 100644 index 0000000..52765af --- /dev/null +++ b/test/CodeGen/Mips/blez_bgez.ll @@ -0,0 +1,36 @@ +; RUN: llc -march=mipsel < %s | FileCheck %s +; RUN: llc -march=mips64el -mcpu=mips64 < %s | FileCheck %s + +; CHECK: test_blez: +; CHECK: blez ${{[0-9]+}}, $BB + +define void @test_blez(i32 %a) { +entry: + %cmp = icmp sgt i32 %a, 0 + br i1 %cmp, label %if.then, label %if.end + +if.then: + tail call void @foo1() + br label %if.end + +if.end: + ret void +} + +declare void @foo1() + +; CHECK: test_bgez: +; CHECK: bgez ${{[0-9]+}}, $BB + +define void @test_bgez(i32 %a) { +entry: + %cmp = icmp slt i32 %a, 0 + br i1 %cmp, label %if.then, label %if.end + +if.then: + tail call void @foo1() + br label %if.end + +if.end: + ret void +} diff --git a/test/CodeGen/Mips/brdelayslot.ll b/test/CodeGen/Mips/brdelayslot.ll index 2deb037..d076f74 100644 --- a/test/CodeGen/Mips/brdelayslot.ll +++ b/test/CodeGen/Mips/brdelayslot.ll @@ -131,7 +131,7 @@ declare void @foo11() ; filled. ; ; SUCCBB: succbbs_loop1: -; SUCCBB: bne ${{[0-9]+}}, $zero, $BB +; SUCCBB: blez $5, $BB ; SUCCBB-NEXT: addiu ; SUCCBB: bne ${{[0-9]+}}, $zero, $BB ; SUCCBB-NEXT: addiu |