diff options
author | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2010-11-10 02:22:44 +0000 |
---|---|---|
committer | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2010-11-10 02:22:44 +0000 |
commit | 0cf2b2b9f0c4f9fc18ef527a227045793a769dee (patch) | |
tree | ea9e4cd385cad605f7df4c10eef89a40b56bf76d /test/CodeGen/Mips | |
parent | c4bb67c8d951feaa4a1429ea2ff0171a30d7d471 (diff) | |
download | external_llvm-0cf2b2b9f0c4f9fc18ef527a227045793a769dee.zip external_llvm-0cf2b2b9f0c4f9fc18ef527a227045793a769dee.tar.gz external_llvm-0cf2b2b9f0c4f9fc18ef527a227045793a769dee.tar.bz2 |
Add a test to the previous added clo instruction. Patch by Akira again
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118668 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/Mips')
-rw-r--r-- | test/CodeGen/Mips/2010-11-09-CountLeading.ll | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/test/CodeGen/Mips/2010-11-09-CountLeading.ll b/test/CodeGen/Mips/2010-11-09-CountLeading.ll new file mode 100644 index 0000000..d592fef --- /dev/null +++ b/test/CodeGen/Mips/2010-11-09-CountLeading.ll @@ -0,0 +1,33 @@ +; RUN: llc -march=mips -mcpu=4ke < %s | FileCheck %s + +; CHECK: clz $2, $4 +define i32 @t1(i32 %X) nounwind readnone { +entry: + %tmp1 = tail call i32 @llvm.ctlz.i32(i32 %X) + ret i32 %tmp1 +} + +declare i32 @llvm.ctlz.i32(i32) nounwind readnone + +; CHECK: clz $2, $4 +define i32 @t2(i32 %X) nounwind readnone { +entry: + %tmp1 = tail call i32 @llvm.ctlz.i32(i32 %X) + ret i32 %tmp1 +} + +; CHECK: clo $2, $4 +define i32 @t3(i32 %X) nounwind readnone { +entry: + %neg = xor i32 %X, -1 + %tmp1 = tail call i32 @llvm.ctlz.i32(i32 %neg) + ret i32 %tmp1 +} + +; CHECK: clo $2, $4 +define i32 @t4(i32 %X) nounwind readnone { +entry: + %neg = xor i32 %X, -1 + %tmp1 = tail call i32 @llvm.ctlz.i32(i32 %neg) + ret i32 %tmp1 +} |