diff options
author | Akira Hatanaka <ahatanaka@mips.com> | 2011-12-19 20:24:28 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@mips.com> | 2011-12-19 20:24:28 +0000 |
commit | 59eb8056e0ea8c5c39b3439f97b88565aed85040 (patch) | |
tree | f29e0546632cf05530a3fe2a199ac28715641b05 | |
parent | f06cb2b207c9a4a99e9d8f2b45f9b48dfddc15ee (diff) | |
download | external_llvm-59eb8056e0ea8c5c39b3439f97b88565aed85040.zip external_llvm-59eb8056e0ea8c5c39b3439f97b88565aed85040.tar.gz external_llvm-59eb8056e0ea8c5c39b3439f97b88565aed85040.tar.bz2 |
Add a test case for r146900.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146901 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/CodeGen/Mips/imm.ll | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/test/CodeGen/Mips/imm.ll b/test/CodeGen/Mips/imm.ll new file mode 100644 index 0000000..eea391e --- /dev/null +++ b/test/CodeGen/Mips/imm.ll @@ -0,0 +1,38 @@ +; RUN: llc -march=mipsel < %s | FileCheck %s + +define i32 @foo0() nounwind readnone { +entry: +; CHECK: foo0 +; CHECK: lui $[[R0:[0-9]+]], 4660 +; CHECK: ori ${{[0-9]+}}, $[[R0]], 22136 + ret i32 305419896 +} + +define i32 @foo1() nounwind readnone { +entry: +; CHECK: foo1 +; CHECK: lui ${{[0-9]+}}, 4660 +; CHECK-NOT: ori + ret i32 305397760 +} + +define i32 @foo2() nounwind readnone { +entry: +; CHECK: foo2 +; CHECK: addiu ${{[0-9]+}}, $zero, 4660 + ret i32 4660 +} + +define i32 @foo17() nounwind readnone { +entry: +; CHECK: foo17 +; CHECK: addiu ${{[0-9]+}}, $zero, -32204 + ret i32 -32204 +} + +define i32 @foo18() nounwind readnone { +entry: +; CHECK: foo18 +; CHECK: ori ${{[0-9]+}}, $zero, 33332 + ret i32 33332 +} |