diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-03-24 21:55:26 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-03-24 21:55:26 +0000 |
commit | 71a6ef7f0e10ad3dce5f46dcb1f2d456d32bc9a2 (patch) | |
tree | d26dfc69403fc7d1a4ebabe5410675b503fda4cb /llvm/test/Integer | |
parent | 77859c2d491a95667a63f4ef9514b1856483ae69 (diff) | |
download | bcm5719-llvm-71a6ef7f0e10ad3dce5f46dcb1f2d456d32bc9a2.tar.gz bcm5719-llvm-71a6ef7f0e10ad3dce5f46dcb1f2d456d32bc9a2.zip |
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.
llvm-svn: 35301
Diffstat (limited to 'llvm/test/Integer')
-rw-r--r-- | llvm/test/Integer/a1.ll | 1 | ||||
-rw-r--r-- | llvm/test/Integer/a1.ll.out | 1 | ||||
-rw-r--r-- | llvm/test/Integer/a15.ll | 1 | ||||
-rw-r--r-- | llvm/test/Integer/a15.ll.out | 3 | ||||
-rw-r--r-- | llvm/test/Integer/a17.ll | 1 | ||||
-rw-r--r-- | llvm/test/Integer/a17.ll.out | 3 | ||||
-rw-r--r-- | llvm/test/Integer/a31.ll | 3 | ||||
-rw-r--r-- | llvm/test/Integer/a31.ll.out | 3 | ||||
-rw-r--r-- | llvm/test/Integer/a33.ll | 3 | ||||
-rw-r--r-- | llvm/test/Integer/a33.ll.out | 3 | ||||
-rw-r--r-- | llvm/test/Integer/a63.ll.out | 2 | ||||
-rw-r--r-- | llvm/test/Integer/a7.ll.out | 2 | ||||
-rw-r--r-- | llvm/test/Integer/a9.ll.out | 2 |
13 files changed, 19 insertions, 9 deletions
diff --git a/llvm/test/Integer/a1.ll b/llvm/test/Integer/a1.ll index 0404d742e74..e6383986795 100644 --- a/llvm/test/Integer/a1.ll +++ b/llvm/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/llvm/test/Integer/a1.ll.out b/llvm/test/Integer/a1.ll.out index 0205e3bce8f..8deafd6bf57 100644 --- a/llvm/test/Integer/a1.ll.out +++ b/llvm/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/llvm/test/Integer/a15.ll b/llvm/test/Integer/a15.ll index 3fc4b1a77d7..5c9dc3b1be0 100644 --- a/llvm/test/Integer/a15.ll +++ b/llvm/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/llvm/test/Integer/a15.ll.out b/llvm/test/Integer/a15.ll.out index 69d3a1a4867..f900f165dbf 100644 --- a/llvm/test/Integer/a15.ll.out +++ b/llvm/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/llvm/test/Integer/a17.ll b/llvm/test/Integer/a17.ll index 8d7485e9019..db03e7c6be0 100644 --- a/llvm/test/Integer/a17.ll +++ b/llvm/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/llvm/test/Integer/a17.ll.out b/llvm/test/Integer/a17.ll.out index 3edb5ac01d3..de851adab3a 100644 --- a/llvm/test/Integer/a17.ll.out +++ b/llvm/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/llvm/test/Integer/a31.ll b/llvm/test/Integer/a31.ll index 3d18b2a49e8..c0c571f6306 100644 --- a/llvm/test/Integer/a31.ll +++ b/llvm/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/llvm/test/Integer/a31.ll.out b/llvm/test/Integer/a31.ll.out index 243cabf7ed7..041525d02d1 100644 --- a/llvm/test/Integer/a31.ll.out +++ b/llvm/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/llvm/test/Integer/a33.ll b/llvm/test/Integer/a33.ll index ac9ce7cde99..f328907b460 100644 --- a/llvm/test/Integer/a33.ll +++ b/llvm/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/llvm/test/Integer/a33.ll.out b/llvm/test/Integer/a33.ll.out index a5708acac29..ec25d521430 100644 --- a/llvm/test/Integer/a33.ll.out +++ b/llvm/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/llvm/test/Integer/a63.ll.out b/llvm/test/Integer/a63.ll.out index 1f732200499..8fd98c7425c 100644 --- a/llvm/test/Integer/a63.ll.out +++ b/llvm/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/llvm/test/Integer/a7.ll.out b/llvm/test/Integer/a7.ll.out index 6008372424e..2aae073f4dd 100644 --- a/llvm/test/Integer/a7.ll.out +++ b/llvm/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/llvm/test/Integer/a9.ll.out b/llvm/test/Integer/a9.ll.out index 7d25d4aa904..963538b35f1 100644 --- a/llvm/test/Integer/a9.ll.out +++ b/llvm/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] |