summaryrefslogtreecommitdiff
path: root/test/Integer
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-03-24 21:55:26 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-03-24 21:55:26 +0000
commit5957d8ffd83836b534952921e9430216ecc14978 (patch)
tree7692648f6ca97ea09c7f2b07208b725d43bd1225 /test/Integer
parent7ac2f81e49442f76e3427227fb1e300ce60fceb4 (diff)
downloadllvm-5957d8ffd83836b534952921e9430216ecc14978.tar.gz
llvm-5957d8ffd83836b534952921e9430216ecc14978.tar.bz2
llvm-5957d8ffd83836b534952921e9430216ecc14978.tar.xz
Fix incorrect test cases for srem. The definition of srem is a remainder so
that the sign of the result follows the sign of the divisor. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35301 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Integer')
-rw-r--r--test/Integer/a1.ll1
-rw-r--r--test/Integer/a1.ll.out1
-rw-r--r--test/Integer/a15.ll1
-rw-r--r--test/Integer/a15.ll.out3
-rw-r--r--test/Integer/a17.ll1
-rw-r--r--test/Integer/a17.ll.out3
-rw-r--r--test/Integer/a31.ll3
-rw-r--r--test/Integer/a31.ll.out3
-rw-r--r--test/Integer/a33.ll3
-rw-r--r--test/Integer/a33.ll.out3
-rw-r--r--test/Integer/a63.ll.out2
-rw-r--r--test/Integer/a7.ll.out2
-rw-r--r--test/Integer/a9.ll.out2
13 files changed, 19 insertions, 9 deletions
diff --git a/test/Integer/a1.ll b/test/Integer/a1.ll
index 0404d742e7..e638398679 100644
--- a/test/Integer/a1.ll
+++ b/test/Integer/a1.ll
@@ -22,3 +22,4 @@
@r = constant i1 udiv(i1 1, i1 -1)
@s = constant i1 srem(i1 -1, i1 1) ; overflow
@t = constant i1 urem(i1 -1, i1 1)
+@u = constant i1 srem(i1 1, i1 -1) ; overflow
diff --git a/test/Integer/a1.ll.out b/test/Integer/a1.ll.out
index 0205e3bce8..8deafd6bf5 100644
--- a/test/Integer/a1.ll.out
+++ b/test/Integer/a1.ll.out
@@ -16,5 +16,6 @@
@r = constant i1 true ; <i1*> [#uses=0]
@s = constant i1 srem (i1 true, i1 true) ; <i1*> [#uses=0]
@t = constant i1 false ; <i1*> [#uses=0]
+@u = constant i1 srem (i1 true, i1 true) ; <i1*> [#uses=0]
implementation ; Functions:
diff --git a/test/Integer/a15.ll b/test/Integer/a15.ll
index 3fc4b1a77d..5c9dc3b1be 100644
--- a/test/Integer/a15.ll
+++ b/test/Integer/a15.ll
@@ -23,4 +23,5 @@
@u = constant i15 urem(i15 32767,i15 -1)
@o = constant i15 trunc( i16 32768 to i15 )
@p = constant i15 trunc( i16 32767 to i15 )
+@v = constant i15 srem(i15 -1, i15 768)
diff --git a/test/Integer/a15.ll.out b/test/Integer/a15.ll.out
index 69d3a1a486..f900f165db 100644
--- a/test/Integer/a15.ll.out
+++ b/test/Integer/a15.ll.out
@@ -13,9 +13,10 @@
@q = constant i15 16381 ; <i15*> [#uses=0]
@r = constant i15 0 ; <i15*> [#uses=0]
@s = constant i15 2 ; <i15*> [#uses=0]
-@t = constant i15 1 ; <i15*> [#uses=0]
+@t = constant i15 -1 ; <i15*> [#uses=0]
@u = constant i15 0 ; <i15*> [#uses=0]
@o = constant i15 0 ; <i15*> [#uses=0]
@p = constant i15 -1 ; <i15*> [#uses=0]
+@v = constant i15 1 ; <i15*> [#uses=0]
implementation ; Functions:
diff --git a/test/Integer/a17.ll b/test/Integer/a17.ll
index 8d7485e901..db03e7c6be 100644
--- a/test/Integer/a17.ll
+++ b/test/Integer/a17.ll
@@ -22,3 +22,4 @@
@t = constant i17 urem(i17 131071,i17 -1)
@o = constant i17 trunc( i18 131072 to i17 )
@p = constant i17 trunc( i18 131071 to i17 )
+@v = constant i17 srem(i17 -1, i17 15)
diff --git a/test/Integer/a17.ll.out b/test/Integer/a17.ll.out
index 3edb5ac01d..de851adab3 100644
--- a/test/Integer/a17.ll.out
+++ b/test/Integer/a17.ll.out
@@ -12,9 +12,10 @@
@n = constant i17 -2 ; <i17*> [#uses=0]
@q = constant i17 0 ; <i17*> [#uses=0]
@r = constant i17 2 ; <i17*> [#uses=0]
-@s = constant i17 1 ; <i17*> [#uses=0]
+@s = constant i17 -1 ; <i17*> [#uses=0]
@t = constant i17 0 ; <i17*> [#uses=0]
@o = constant i17 0 ; <i17*> [#uses=0]
@p = constant i17 -1 ; <i17*> [#uses=0]
+@v = constant i17 1 ; <i17*> [#uses=0]
implementation ; Functions:
diff --git a/test/Integer/a31.ll b/test/Integer/a31.ll
index 3d18b2a49e..c0c571f630 100644
--- a/test/Integer/a31.ll
+++ b/test/Integer/a31.ll
@@ -18,7 +18,8 @@
@n = constant i31 mul(i31 2147483647, i31 2)
@q = constant i31 sdiv(i31 -1, i31 1073741823)
@r = constant i31 udiv(i31 -1, i31 1073741823)
-@s = constant i31 srem(i31 3, i31 2147483646)
+@s = constant i31 srem(i31 1, i31 2147483646)
@t = constant i31 urem(i31 2147483647,i31 -1)
@o = constant i31 trunc( i32 2147483648 to i31 )
@p = constant i31 trunc( i32 2147483647 to i31 )
+@u = constant i31 srem(i31 -3, i31 17)
diff --git a/test/Integer/a31.ll.out b/test/Integer/a31.ll.out
index 243cabf7ed..041525d02d 100644
--- a/test/Integer/a31.ll.out
+++ b/test/Integer/a31.ll.out
@@ -12,9 +12,10 @@
@n = constant i31 -2 ; <i31*> [#uses=0]
@q = constant i31 0 ; <i31*> [#uses=0]
@r = constant i31 2 ; <i31*> [#uses=0]
-@s = constant i31 1 ; <i31*> [#uses=0]
+@s = constant i31 -1 ; <i31*> [#uses=0]
@t = constant i31 0 ; <i31*> [#uses=0]
@o = constant i31 0 ; <i31*> [#uses=0]
@p = constant i31 -1 ; <i31*> [#uses=0]
+@u = constant i31 3 ; <i31*> [#uses=0]
implementation ; Functions:
diff --git a/test/Integer/a33.ll b/test/Integer/a33.ll
index ac9ce7cde9..f328907b46 100644
--- a/test/Integer/a33.ll
+++ b/test/Integer/a33.ll
@@ -18,8 +18,9 @@
@n = constant i33 mul(i33 8589934591, i33 2)
@q = constant i33 sdiv(i33 -1, i33 4294967295)
@r = constant i33 udiv(i33 -1, i33 4294967295)
-@s = constant i33 srem(i33 3, i33 8589934590)
+@s = constant i33 srem(i33 1, i33 8589934590)
@t = constant i33 urem(i33 8589934591,i33 -1)
@o = constant i33 trunc( i34 8589934592 to i33 )
@p = constant i33 trunc( i34 8589934591 to i33 )
+@u = constant i33 srem(i33 -1, i33 17)
diff --git a/test/Integer/a33.ll.out b/test/Integer/a33.ll.out
index a5708acac2..ec25d52143 100644
--- a/test/Integer/a33.ll.out
+++ b/test/Integer/a33.ll.out
@@ -12,9 +12,10 @@
@n = constant i33 -2 ; <i33*> [#uses=0]
@q = constant i33 0 ; <i33*> [#uses=0]
@r = constant i33 2 ; <i33*> [#uses=0]
-@s = constant i33 1 ; <i33*> [#uses=0]
+@s = constant i33 -1 ; <i33*> [#uses=0]
@t = constant i33 0 ; <i33*> [#uses=0]
@o = constant i33 0 ; <i33*> [#uses=0]
@p = constant i33 -1 ; <i33*> [#uses=0]
+@u = constant i33 1 ; <i33*> [#uses=0]
implementation ; Functions:
diff --git a/test/Integer/a63.ll.out b/test/Integer/a63.ll.out
index 1f73220049..8fd98c7425 100644
--- a/test/Integer/a63.ll.out
+++ b/test/Integer/a63.ll.out
@@ -13,7 +13,7 @@
@q = constant i63 0 ; <i63*> [#uses=0]
@u = constant i63 -1 ; <i63*> [#uses=0]
@r = constant i63 2 ; <i63*> [#uses=0]
-@s = constant i63 1 ; <i63*> [#uses=0]
+@s = constant i63 -1 ; <i63*> [#uses=0]
@t = constant i63 0 ; <i63*> [#uses=0]
@o = constant i63 0 ; <i63*> [#uses=0]
@p = constant i63 -1 ; <i63*> [#uses=0]
diff --git a/test/Integer/a7.ll.out b/test/Integer/a7.ll.out
index 6008372424..2aae073f4d 100644
--- a/test/Integer/a7.ll.out
+++ b/test/Integer/a7.ll.out
@@ -18,7 +18,7 @@
@u = constant i7 -64 ; <i7*> [#uses=0]
@v = constant i7 0 ; <i7*> [#uses=0]
@w = constant i7 2 ; <i7*> [#uses=0]
-@x = constant i7 1 ; <i7*> [#uses=0]
+@x = constant i7 -1 ; <i7*> [#uses=0]
@y = constant i7 0 ; <i7*> [#uses=0]
@o = constant i7 0 ; <i7*> [#uses=0]
@p = constant i7 -1 ; <i7*> [#uses=0]
diff --git a/test/Integer/a9.ll.out b/test/Integer/a9.ll.out
index 7d25d4aa90..963538b35f 100644
--- a/test/Integer/a9.ll.out
+++ b/test/Integer/a9.ll.out
@@ -13,7 +13,7 @@
@q = constant i9 0 ; <i9*> [#uses=0]
@r = constant i9 255 ; <i9*> [#uses=0]
@s = constant i9 0 ; <i9*> [#uses=0]
-@t = constant i9 1 ; <i9*> [#uses=0]
+@t = constant i9 -1 ; <i9*> [#uses=0]
@o = constant i9 0 ; <i9*> [#uses=0]
@p = constant i9 -1 ; <i9*> [#uses=0]