summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/SystemZ
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2009-07-16 13:33:57 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2009-07-16 13:33:57 +0000
commit89edcd0927aa56584686c94bbb6914ce9f445e3a (patch)
tree54cebd14bffa4c22f6a3a66e17fea4855a900229 /test/CodeGen/SystemZ
parentc79629536a15673eecfa40ed34985a6d08aca757 (diff)
downloadexternal_llvm-89edcd0927aa56584686c94bbb6914ce9f445e3a.zip
external_llvm-89edcd0927aa56584686c94bbb6914ce9f445e3a.tar.gz
external_llvm-89edcd0927aa56584686c94bbb6914ce9f445e3a.tar.bz2
Provide masked reg-imm 'or' and 'and'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75919 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/SystemZ')
-rw-r--r--test/CodeGen/SystemZ/02-RetAndImm.ll27
-rw-r--r--test/CodeGen/SystemZ/02-RetOrImm.ll27
2 files changed, 46 insertions, 8 deletions
diff --git a/test/CodeGen/SystemZ/02-RetAndImm.ll b/test/CodeGen/SystemZ/02-RetAndImm.ll
index 077ab86..f19ceab 100644
--- a/test/CodeGen/SystemZ/02-RetAndImm.ll
+++ b/test/CodeGen/SystemZ/02-RetAndImm.ll
@@ -1,9 +1,28 @@
-; RUN: llvm-as < %s | llc -march=systemz
-define i64 @foo(i64 %a, i64 %b) {
+; RUN: llvm-as < %s | llc -march=systemz | grep nill | count 1
+; RUN: llvm-as < %s | llc -march=systemz | grep nilh | count 1
+; RUN: llvm-as < %s | llc -march=systemz | grep nihl | count 1
+; RUN: llvm-as < %s | llc -march=systemz | grep nihh | count 1
+
+define i64 @foo1(i64 %a, i64 %b) {
entry:
%c = and i64 %a, 1
ret i64 %c
}
-; FIXME: SystemZ has 4 and reg-imm instructions depending on imm,
-; we need to support them someday. \ No newline at end of file
+define i64 @foo2(i64 %a, i64 %b) {
+entry:
+ %c = and i64 %a, 131072
+ ret i64 %c
+}
+
+define i64 @foo3(i64 %a, i64 %b) {
+entry:
+ %c = and i64 %a, 8589934592
+ ret i64 %c
+}
+
+define i64 @foo4(i64 %a, i64 %b) {
+entry:
+ %c = and i64 %a, 562949953421312
+ ret i64 %c
+}
diff --git a/test/CodeGen/SystemZ/02-RetOrImm.ll b/test/CodeGen/SystemZ/02-RetOrImm.ll
index c06e56f..881654a 100644
--- a/test/CodeGen/SystemZ/02-RetOrImm.ll
+++ b/test/CodeGen/SystemZ/02-RetOrImm.ll
@@ -1,9 +1,28 @@
-; RUN: llvm-as < %s | llc -march=systemz
-define i64 @foo(i64 %a, i64 %b) {
+; RUN: llvm-as < %s | llc -march=systemz | grep oill | count 1
+; RUN: llvm-as < %s | llc -march=systemz | grep oilh | count 1
+; RUN: llvm-as < %s | llc -march=systemz | grep oihl | count 1
+; RUN: llvm-as < %s | llc -march=systemz | grep oihh | count 1
+
+define i64 @foo1(i64 %a, i64 %b) {
entry:
%c = or i64 %a, 1
ret i64 %c
}
-; FIXME: SystemZ has 4 or reg-imm instructions depending on imm,
-; we need to support them someday. \ No newline at end of file
+define i64 @foo2(i64 %a, i64 %b) {
+entry:
+ %c = or i64 %a, 131072
+ ret i64 %c
+}
+
+define i64 @foo3(i64 %a, i64 %b) {
+entry:
+ %c = or i64 %a, 8589934592
+ ret i64 %c
+}
+
+define i64 @foo4(i64 %a, i64 %b) {
+entry:
+ %c = or i64 %a, 562949953421312
+ ret i64 %c
+}