diff options
author | Daniel Sanders <daniel.sanders@imgtec.com> | 2013-10-17 13:38:20 +0000 |
---|---|---|
committer | Daniel Sanders <daniel.sanders@imgtec.com> | 2013-10-17 13:38:20 +0000 |
commit | 52244da7f2b3def646900520668b859343b84a33 (patch) | |
tree | 45c534f9df0dac583208d73fe5c68bc96f4ec0b4 /test/CodeGen/Mips/msa | |
parent | 2e56d575b7ea507684935d5cd6d5aee96d72ceb4 (diff) | |
download | external_llvm-52244da7f2b3def646900520668b859343b84a33.zip external_llvm-52244da7f2b3def646900520668b859343b84a33.tar.gz external_llvm-52244da7f2b3def646900520668b859343b84a33.tar.bz2 |
[mips][msa] Added lsa instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192895 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/Mips/msa')
-rw-r--r-- | test/CodeGen/Mips/msa/special.ll | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/CodeGen/Mips/msa/special.ll b/test/CodeGen/Mips/msa/special.ll new file mode 100644 index 0000000..60a4369 --- /dev/null +++ b/test/CodeGen/Mips/msa/special.ll @@ -0,0 +1,26 @@ +; Test the MSA intrinsics that are encoded with the SPECIAL instruction format. + +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck %s + +define i32 @llvm_mips_lsa_test(i32 %a, i32 %b) nounwind { +entry: + %0 = tail call i32 @llvm.mips.lsa(i32 %a, i32 %b, i32 2) + ret i32 %0 +} + +declare i32 @llvm.mips.lsa(i32, i32, i32) nounwind + +; CHECK: llvm_mips_lsa_test: +; CHECK: lsa {{\$[0-9]+}}, {{\$[0-9]+}}, {{\$[0-9]+}}, 2 +; CHECK: .size llvm_mips_lsa_test + +define i32 @lsa_test(i32 %a, i32 %b) nounwind { +entry: + %0 = shl i32 %b, 2 + %1 = add i32 %a, %0 + ret i32 %1 +} + +; CHECK: lsa_test: +; CHECK: lsa {{\$[0-9]+}}, {{\$[0-9]+}}, {{\$[0-9]+}}, 2 +; CHECK: .size lsa_test |