summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/Mips/llvm-ir/and.ll
diff options
context:
space:
mode:
authorVasileios Kalintiris <Vasileios.Kalintiris@imgtec.com>2015-01-26 12:33:22 +0000
committerVasileios Kalintiris <Vasileios.Kalintiris@imgtec.com>2015-01-26 12:33:22 +0000
commitef96a8ecd6308cc31e43515c2ce0bae6ffbdbbc6 (patch)
tree8690f9c5f08e73ef25a3bc3d7e4ec148cb077997 /llvm/test/CodeGen/Mips/llvm-ir/and.ll
parentdceac987bd219730f99b477f7d730486ad39d683 (diff)
downloadbcm5719-llvm-ef96a8ecd6308cc31e43515c2ce0bae6ffbdbbc6.tar.gz
bcm5719-llvm-ef96a8ecd6308cc31e43515c2ce0bae6ffbdbbc6.zip
[mips] Enable arithmetic and binary operations for the i128 data type.
Summary: This patch adds support for some operations that were missing from 128-bit integer types (add/sub/mul/sdiv/udiv... etc.). With these changes we can support the __int128_t and __uint128_t data types from C/C++. Depends on D7125 Reviewers: dsanders Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D7143 llvm-svn: 227089
Diffstat (limited to 'llvm/test/CodeGen/Mips/llvm-ir/and.ll')
-rw-r--r--llvm/test/CodeGen/Mips/llvm-ir/and.ll20
1 files changed, 20 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/Mips/llvm-ir/and.ll b/llvm/test/CodeGen/Mips/llvm-ir/and.ll
index 3cb4957654a..09d0ef9238a 100644
--- a/llvm/test/CodeGen/Mips/llvm-ir/and.ll
+++ b/llvm/test/CodeGen/Mips/llvm-ir/and.ll
@@ -72,3 +72,23 @@ entry:
%r = and i64 %a, %b
ret i64 %r
}
+
+define signext i128 @and_i128(i128 signext %a, i128 signext %b) {
+entry:
+; ALL-LABEL: and_i128:
+
+ ; GP32: lw $[[T0:[0-9]+]], 24($sp)
+ ; GP32: lw $[[T1:[0-9]+]], 20($sp)
+ ; GP32: lw $[[T2:[0-9]+]], 16($sp)
+ ; GP32: and $2, $4, $[[T2]]
+ ; GP32: and $3, $5, $[[T1]]
+ ; GP32: and $4, $6, $[[T0]]
+ ; GP32: lw $[[T3:[0-9]+]], 28($sp)
+ ; GP32: and $5, $7, $[[T3]]
+
+ ; GP64: and $2, $4, $6
+ ; GP64: and $3, $5, $7
+
+ %r = and i128 %a, %b
+ ret i128 %r
+}
OpenPOWER on IntegriCloud