aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/Mips
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@mips.com>2011-09-30 02:08:54 +0000
committerAkira Hatanaka <ahatanaka@mips.com>2011-09-30 02:08:54 +0000
commitf549ab78533cfb7a22a88216f20d69edfcee3cc9 (patch)
treeaac6a709d30d9596b01a8490c495f540bceed15d /test/CodeGen/Mips
parent4ebbf7b8a8e80532bd2ddf7209e62689c1698a96 (diff)
downloadexternal_llvm-f549ab78533cfb7a22a88216f20d69edfcee3cc9.zip
external_llvm-f549ab78533cfb7a22a88216f20d69edfcee3cc9.tar.gz
external_llvm-f549ab78533cfb7a22a88216f20d69edfcee3cc9.tar.bz2
Mips64 arithmetic and logical instructions with one source register and
immediate. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140839 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/Mips')
-rw-r--r--test/CodeGen/Mips/mips64instrs.ll36
1 files changed, 36 insertions, 0 deletions
diff --git a/test/CodeGen/Mips/mips64instrs.ll b/test/CodeGen/Mips/mips64instrs.ll
index 1adf137..8cbb5b9 100644
--- a/test/CodeGen/Mips/mips64instrs.ll
+++ b/test/CodeGen/Mips/mips64instrs.ll
@@ -34,3 +34,39 @@ entry:
%xor = xor i64 %a1, %a0
ret i64 %xor
}
+
+define i64 @f7(i64 %a0) nounwind readnone {
+entry:
+; CHECK: daddiu
+ %add = add nsw i64 %a0, 20
+ ret i64 %add
+}
+
+define i64 @f8(i64 %a0) nounwind readnone {
+entry:
+; CHECK: daddiu
+ %sub = add nsw i64 %a0, -20
+ ret i64 %sub
+}
+
+define i64 @f9(i64 %a0) nounwind readnone {
+entry:
+; CHECK: andi
+ %and = and i64 %a0, 20
+ ret i64 %and
+}
+
+define i64 @f10(i64 %a0) nounwind readnone {
+entry:
+; CHECK: ori
+ %or = or i64 %a0, 20
+ ret i64 %or
+}
+
+define i64 @f11(i64 %a0) nounwind readnone {
+entry:
+; CHECK: xori
+ %xor = xor i64 %a0, 20
+ ret i64 %xor
+}
+