aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/SystemZ
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2009-07-16 13:42:31 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2009-07-16 13:42:31 +0000
commita51752cbea5d57956f177470f463baeeee33f3d7 (patch)
treeab071bbc5d65c901f9b25530dcddb739edf296ab /test/CodeGen/SystemZ
parent0692fabb4e681da2907361346ff984290dbb3e40 (diff)
downloadexternal_llvm-a51752cbea5d57956f177470f463baeeee33f3d7.zip
external_llvm-a51752cbea5d57956f177470f463baeeee33f3d7.tar.gz
external_llvm-a51752cbea5d57956f177470f463baeeee33f3d7.tar.bz2
Add bunch of 32-bit patterns... Uffff :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75926 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/SystemZ')
-rw-r--r--test/CodeGen/SystemZ/03-RetAddImmSubreg.ll42
-rw-r--r--test/CodeGen/SystemZ/03-RetAddSubreg.ll22
-rw-r--r--test/CodeGen/SystemZ/03-RetAndImmSubreg.ll39
-rw-r--r--test/CodeGen/SystemZ/03-RetAndSubreg.ll20
-rw-r--r--test/CodeGen/SystemZ/03-RetArgSubreg.ll19
-rw-r--r--test/CodeGen/SystemZ/03-RetImmSubreg.ll42
-rw-r--r--test/CodeGen/SystemZ/03-RetOrImmSubreg.ll60
-rw-r--r--test/CodeGen/SystemZ/03-RetOrSubreg.ll23
-rw-r--r--test/CodeGen/SystemZ/03-RetSubImmSubreg.ll42
-rw-r--r--test/CodeGen/SystemZ/03-RetSubSubreg.ll22
-rw-r--r--test/CodeGen/SystemZ/03-RetXorImmSubreg.ll58
-rw-r--r--test/CodeGen/SystemZ/03-RetXorSubreg.ll23
12 files changed, 412 insertions, 0 deletions
diff --git a/test/CodeGen/SystemZ/03-RetAddImmSubreg.ll b/test/CodeGen/SystemZ/03-RetAddImmSubreg.ll
new file mode 100644
index 0000000..d6a3457
--- /dev/null
+++ b/test/CodeGen/SystemZ/03-RetAddImmSubreg.ll
@@ -0,0 +1,42 @@
+; RUN: llvm-as < %s | llc -march=systemz | grep ahi | count 3
+; RUN: llvm-as < %s | llc -march=systemz | grep afi | count 3
+; RUN: llvm-as < %s | llc -march=systemz | grep lgfr | count 4
+; RUN: llvm-as < %s | llc -march=systemz | grep llgfr | count 2
+
+
+define i32 @foo1(i32 %a, i32 %b) {
+entry:
+ %c = add i32 %a, 1
+ ret i32 %c
+}
+
+define i32 @foo2(i32 %a, i32 %b) {
+entry:
+ %c = add i32 %a, 131072
+ ret i32 %c
+}
+
+define i32 @foo3(i32 %a, i32 %b) zeroext {
+entry:
+ %c = add i32 %a, 1
+ ret i32 %c
+}
+
+define i32 @foo4(i32 %a, i32 %b) zeroext {
+entry:
+ %c = add i32 %a, 131072
+ ret i32 %c
+}
+
+define i32 @foo5(i32 %a, i32 %b) signext {
+entry:
+ %c = add i32 %a, 1
+ ret i32 %c
+}
+
+define i32 @foo6(i32 %a, i32 %b) signext {
+entry:
+ %c = add i32 %a, 131072
+ ret i32 %c
+}
+
diff --git a/test/CodeGen/SystemZ/03-RetAddSubreg.ll b/test/CodeGen/SystemZ/03-RetAddSubreg.ll
new file mode 100644
index 0000000..ba3f7c5
--- /dev/null
+++ b/test/CodeGen/SystemZ/03-RetAddSubreg.ll
@@ -0,0 +1,22 @@
+; RUN: llvm-as < %s | llc -march=systemz | grep ar | count 3
+; RUN: llvm-as < %s | llc -march=systemz | grep lgfr | count 2
+; RUN: llvm-as < %s | llc -march=systemz | grep llgfr | count 1
+
+define i32 @foo(i32 %a, i32 %b) {
+entry:
+ %c = add i32 %a, %b
+ ret i32 %c
+}
+
+define i32 @foo1(i32 %a, i32 %b) zeroext {
+entry:
+ %c = add i32 %a, %b
+ ret i32 %c
+}
+
+define i32 @foo2(i32 %a, i32 %b) signext {
+entry:
+ %c = add i32 %a, %b
+ ret i32 %c
+}
+
diff --git a/test/CodeGen/SystemZ/03-RetAndImmSubreg.ll b/test/CodeGen/SystemZ/03-RetAndImmSubreg.ll
new file mode 100644
index 0000000..86fe94a
--- /dev/null
+++ b/test/CodeGen/SystemZ/03-RetAndImmSubreg.ll
@@ -0,0 +1,39 @@
+; RUN: llvm-as < %s | llc -march=systemz | grep nill | count 3
+; RUN: llvm-as < %s | llc -march=systemz | grep nilh | count 3
+
+define i32 @foo1(i32 %a, i32 %b) {
+entry:
+ %c = and i32 %a, 1
+ ret i32 %c
+}
+
+define i32 @foo2(i32 %a, i32 %b) {
+entry:
+ %c = and i32 %a, 131072
+ ret i32 %c
+}
+
+define i32 @foo3(i32 %a, i32 %b) zeroext {
+entry:
+ %c = and i32 %a, 1
+ ret i32 %c
+}
+
+define i32 @foo4(i32 %a, i32 %b) signext {
+entry:
+ %c = and i32 %a, 131072
+ ret i32 %c
+}
+
+define i32 @foo5(i32 %a, i32 %b) zeroext {
+entry:
+ %c = and i32 %a, 1
+ ret i32 %c
+}
+
+define i32 @foo6(i32 %a, i32 %b) signext {
+entry:
+ %c = and i32 %a, 131072
+ ret i32 %c
+}
+
diff --git a/test/CodeGen/SystemZ/03-RetAndSubreg.ll b/test/CodeGen/SystemZ/03-RetAndSubreg.ll
new file mode 100644
index 0000000..8b65757
--- /dev/null
+++ b/test/CodeGen/SystemZ/03-RetAndSubreg.ll
@@ -0,0 +1,20 @@
+; RUN: llvm-as < %s | llc -march=systemz | grep ngr | count 3
+
+define i32 @foo(i32 %a, i32 %b) {
+entry:
+ %c = and i32 %a, %b
+ ret i32 %c
+}
+
+define i32 @foo1(i32 %a, i32 %b) zeroext {
+entry:
+ %c = and i32 %a, %b
+ ret i32 %c
+}
+
+define i32 @foo2(i32 %a, i32 %b) signext {
+entry:
+ %c = and i32 %a, %b
+ ret i32 %c
+}
+
diff --git a/test/CodeGen/SystemZ/03-RetArgSubreg.ll b/test/CodeGen/SystemZ/03-RetArgSubreg.ll
new file mode 100644
index 0000000..a31adbc
--- /dev/null
+++ b/test/CodeGen/SystemZ/03-RetArgSubreg.ll
@@ -0,0 +1,19 @@
+; RUN: llvm-as < %s | llc -march=systemz | grep lgr | count 2
+; RUN: llvm-as < %s | llc -march=systemz | grep nilf | count 1
+; RUN: llvm-as < %s | llc -march=systemz | grep lgfr | count 1
+
+
+define i32 @foo(i32 %a, i32 %b) {
+entry:
+ ret i32 %b
+}
+
+define i32 @foo1(i32 %a, i32 %b) zeroext {
+entry:
+ ret i32 %b
+}
+
+define i32 @foo2(i32 %a, i32 %b) signext {
+entry:
+ ret i32 %b
+}
diff --git a/test/CodeGen/SystemZ/03-RetImmSubreg.ll b/test/CodeGen/SystemZ/03-RetImmSubreg.ll
new file mode 100644
index 0000000..88d66d0
--- /dev/null
+++ b/test/CodeGen/SystemZ/03-RetImmSubreg.ll
@@ -0,0 +1,42 @@
+; RUN: llvm-as < %s | llc -march=systemz | grep lghi | count 2
+; RUN: llvm-as < %s | llc -march=systemz | grep llill | count 1
+; RUN: llvm-as < %s | llc -march=systemz | grep llilh | count 1
+; RUN: llvm-as < %s | llc -march=systemz | grep lgfi | count 1
+; RUN: llvm-as < %s | llc -march=systemz | grep llilf | count 2
+
+
+define i32 @foo1() {
+entry:
+ ret i32 1
+}
+
+define i32 @foo2() {
+entry:
+ ret i32 65535
+}
+
+define i32 @foo3() {
+entry:
+ ret i32 131072
+}
+
+define i32 @foo4() {
+entry:
+ ret i32 65537
+}
+
+define i32 @foo5() {
+entry:
+ ret i32 4294967295
+}
+
+define i32 @foo6() zeroext {
+entry:
+ ret i32 4294967295
+}
+
+define i32 @foo7() signext {
+entry:
+ ret i32 4294967295
+}
+
diff --git a/test/CodeGen/SystemZ/03-RetOrImmSubreg.ll b/test/CodeGen/SystemZ/03-RetOrImmSubreg.ll
new file mode 100644
index 0000000..75ba28e
--- /dev/null
+++ b/test/CodeGen/SystemZ/03-RetOrImmSubreg.ll
@@ -0,0 +1,60 @@
+; RUN: llvm-as < %s | llc -march=systemz | grep oill | count 3
+; RUN: llvm-as < %s | llc -march=systemz | grep oilh | count 3
+; RUN: llvm-as < %s | llc -march=systemz | grep oilf | count 3
+; RUN: llvm-as < %s | llc -march=systemz | grep llgfr | count 3
+; RUN: llvm-as < %s | llc -march=systemz | grep lgfr | count 6
+
+define i32 @foo1(i32 %a, i32 %b) {
+entry:
+ %c = or i32 %a, 1
+ ret i32 %c
+}
+
+define i32 @foo2(i32 %a, i32 %b) {
+entry:
+ %c = or i32 %a, 131072
+ ret i32 %c
+}
+
+define i32 @foo7(i32 %a, i32 %b) {
+entry:
+ %c = or i32 %a, 123456
+ ret i32 %c
+}
+
+define i32 @foo3(i32 %a, i32 %b) zeroext {
+entry:
+ %c = or i32 %a, 1
+ ret i32 %c
+}
+
+define i32 @foo8(i32 %a, i32 %b) zeroext {
+entry:
+ %c = or i32 %a, 123456
+ ret i32 %c
+}
+
+define i32 @foo4(i32 %a, i32 %b) signext {
+entry:
+ %c = or i32 %a, 131072
+ ret i32 %c
+}
+
+define i32 @foo5(i32 %a, i32 %b) zeroext {
+entry:
+ %c = or i32 %a, 1
+ ret i32 %c
+}
+
+define i32 @foo6(i32 %a, i32 %b) signext {
+entry:
+ %c = or i32 %a, 131072
+ ret i32 %c
+}
+
+define i32 @foo9(i32 %a, i32 %b) signext {
+entry:
+ %c = or i32 %a, 123456
+ ret i32 %c
+}
+
diff --git a/test/CodeGen/SystemZ/03-RetOrSubreg.ll b/test/CodeGen/SystemZ/03-RetOrSubreg.ll
new file mode 100644
index 0000000..d0598fc
--- /dev/null
+++ b/test/CodeGen/SystemZ/03-RetOrSubreg.ll
@@ -0,0 +1,23 @@
+; RUN: llvm-as < %s | llc -march=systemz | grep ogr | count 3
+; RUN: llvm-as < %s | llc -march=systemz | grep nilf | count 1
+; RUN: llvm-as < %s | llc -march=systemz | grep lgfr | count 1
+
+
+define i32 @foo(i32 %a, i32 %b) {
+entry:
+ %c = or i32 %a, %b
+ ret i32 %c
+}
+
+define i32 @foo1(i32 %a, i32 %b) zeroext {
+entry:
+ %c = or i32 %a, %b
+ ret i32 %c
+}
+
+define i32 @foo2(i32 %a, i32 %b) signext {
+entry:
+ %c = or i32 %a, %b
+ ret i32 %c
+}
+
diff --git a/test/CodeGen/SystemZ/03-RetSubImmSubreg.ll b/test/CodeGen/SystemZ/03-RetSubImmSubreg.ll
new file mode 100644
index 0000000..f241562
--- /dev/null
+++ b/test/CodeGen/SystemZ/03-RetSubImmSubreg.ll
@@ -0,0 +1,42 @@
+; RUN: llvm-as < %s | llc -march=systemz | grep ahi | count 3
+; RUN: llvm-as < %s | llc -march=systemz | grep afi | count 3
+; RUN: llvm-as < %s | llc -march=systemz | grep lgfr | count 4
+; RUN: llvm-as < %s | llc -march=systemz | grep llgfr | count 2
+
+
+define i32 @foo1(i32 %a, i32 %b) {
+entry:
+ %c = sub i32 %a, 1
+ ret i32 %c
+}
+
+define i32 @foo2(i32 %a, i32 %b) {
+entry:
+ %c = sub i32 %a, 131072
+ ret i32 %c
+}
+
+define i32 @foo3(i32 %a, i32 %b) zeroext {
+entry:
+ %c = sub i32 %a, 1
+ ret i32 %c
+}
+
+define i32 @foo4(i32 %a, i32 %b) signext {
+entry:
+ %c = sub i32 %a, 131072
+ ret i32 %c
+}
+
+define i32 @foo5(i32 %a, i32 %b) zeroext {
+entry:
+ %c = sub i32 %a, 1
+ ret i32 %c
+}
+
+define i32 @foo6(i32 %a, i32 %b) signext {
+entry:
+ %c = sub i32 %a, 131072
+ ret i32 %c
+}
+
diff --git a/test/CodeGen/SystemZ/03-RetSubSubreg.ll b/test/CodeGen/SystemZ/03-RetSubSubreg.ll
new file mode 100644
index 0000000..591b37d
--- /dev/null
+++ b/test/CodeGen/SystemZ/03-RetSubSubreg.ll
@@ -0,0 +1,22 @@
+; RUN: llvm-as < %s | llc -march=systemz | grep sr | count 3
+; RUN: llvm-as < %s | llc -march=systemz | grep llgfr | count 1
+; RUN: llvm-as < %s | llc -march=systemz | grep lgfr | count 2
+
+define i32 @foo(i32 %a, i32 %b) {
+entry:
+ %c = sub i32 %a, %b
+ ret i32 %c
+}
+
+define i32 @foo1(i32 %a, i32 %b) zeroext {
+entry:
+ %c = sub i32 %a, %b
+ ret i32 %c
+}
+
+define i32 @foo2(i32 %a, i32 %b) signext {
+entry:
+ %c = sub i32 %a, %b
+ ret i32 %c
+}
+
diff --git a/test/CodeGen/SystemZ/03-RetXorImmSubreg.ll b/test/CodeGen/SystemZ/03-RetXorImmSubreg.ll
new file mode 100644
index 0000000..dc60334
--- /dev/null
+++ b/test/CodeGen/SystemZ/03-RetXorImmSubreg.ll
@@ -0,0 +1,58 @@
+; RUN: llvm-as < %s | llc -march=systemz | grep xilf | count 9
+; RUN: llvm-as < %s | llc -march=systemz | grep llgfr | count 3
+; RUN: llvm-as < %s | llc -march=systemz | grep lgfr | count 6
+
+define i32 @foo1(i32 %a, i32 %b) {
+entry:
+ %c = xor i32 %a, 1
+ ret i32 %c
+}
+
+define i32 @foo2(i32 %a, i32 %b) {
+entry:
+ %c = xor i32 %a, 131072
+ ret i32 %c
+}
+
+define i32 @foo7(i32 %a, i32 %b) {
+entry:
+ %c = xor i32 %a, 123456
+ ret i32 %c
+}
+
+define i32 @foo3(i32 %a, i32 %b) zeroext {
+entry:
+ %c = xor i32 %a, 1
+ ret i32 %c
+}
+
+define i32 @foo8(i32 %a, i32 %b) zeroext {
+entry:
+ %c = xor i32 %a, 123456
+ ret i32 %c
+}
+
+define i32 @foo4(i32 %a, i32 %b) signext {
+entry:
+ %c = xor i32 %a, 131072
+ ret i32 %c
+}
+
+define i32 @foo5(i32 %a, i32 %b) zeroext {
+entry:
+ %c = xor i32 %a, 1
+ ret i32 %c
+}
+
+define i32 @foo6(i32 %a, i32 %b) signext {
+entry:
+ %c = xor i32 %a, 131072
+ ret i32 %c
+}
+
+define i32 @foo9(i32 %a, i32 %b) signext {
+entry:
+ %c = xor i32 %a, 123456
+ ret i32 %c
+}
+
diff --git a/test/CodeGen/SystemZ/03-RetXorSubreg.ll b/test/CodeGen/SystemZ/03-RetXorSubreg.ll
new file mode 100644
index 0000000..e8caba1
--- /dev/null
+++ b/test/CodeGen/SystemZ/03-RetXorSubreg.ll
@@ -0,0 +1,23 @@
+; RUN: llvm-as < %s | llc -march=systemz | grep xgr | count 3
+; RUN: llvm-as < %s | llc -march=systemz | grep nilf | count 1
+; RUN: llvm-as < %s | llc -march=systemz | grep lgfr | count 1
+
+
+define i32 @foo(i32 %a, i32 %b) {
+entry:
+ %c = xor i32 %a, %b
+ ret i32 %c
+}
+
+define i32 @foo1(i32 %a, i32 %b) zeroext {
+entry:
+ %c = xor i32 %a, %b
+ ret i32 %c
+}
+
+define i32 @foo2(i32 %a, i32 %b) signext {
+entry:
+ %c = xor i32 %a, %b
+ ret i32 %c
+}
+