Changes in directory llvm-test/SingleSource/UnitTests/Integer:
bigint.c updated: 1.8 - 1.9
bigint.reference_output updated: 1.2 - 1.3
---
Log message:
Make the output of this test case easier to verify.
---
Diffs of the changes: (+42 -19)
bigint.c| 46 +-
bigint.reference_output | 15 +--
2 files changed, 42 insertions(+), 19 deletions(-)
Index: llvm-test/SingleSource/UnitTests/Integer/bigint.c
diff -u llvm-test/SingleSource/UnitTests/Integer/bigint.c:1.8
llvm-test/SingleSource/UnitTests/Integer/bigint.c:1.9
--- llvm-test/SingleSource/UnitTests/Integer/bigint.c:1.8 Wed Apr 18
00:40:12 2007
+++ llvm-test/SingleSource/UnitTests/Integer/bigint.c Mon May 14 13:43:28 2007
@@ -17,37 +17,49 @@
const uint10 bnd = 1023;
-int500 x = 0xULL;
+int500 x = -1;
int169 y = -0xabcdefdeULL;
int my_test()
{
+ printf(Initially:\n);
+ printf(int500 x = );
+ printBits(x);
+ printf(\n);
+ printf(int169 y = );
+ printBits(y);
+ printf(\n);
+
uint10 i = 0;
int169 result;
int32 l_result;
long long rem;
long long rem2;
- {
-;
-for ( ; ; ) {
- bool ssdm_tmp_1 = (i bnd);
- if (!ssdm_tmp_1) break;
- if (i % 2 == 0)
-x = x + 1;
- else
-y = y - x;
-
- ++i;
-}
+ for ( i = 0 ; i bnd ; ++i) {
+if (i % 2 == 0)
+ x = x + 1;
+else
+ y = y - x;
}
+
+ printf(\nAfter modification:\n);
+ printf(int500 x = );
+ printBits(x);
+ printf(\n);
+ printf(int169 y = );
+ printBits(y);
+ printf(\n);
+
+ printf(\nresult = x * y = );
result = x*y;
+ printBits(result);
+ printf(\n);
+
l_result = result % 0x37015;
- rem = l_result;
- printf(rem = %lld\n, rem);
+ printf(\nresult %% 0x37015 = %d\n, l_result);
l_result = result % -198721;
- rem2 = l_result;
- printf(rem2 = %lld\n, rem2);
+ printf(\nresult %% -198721 = %d\n, l_result);
return 0;
}
Index: llvm-test/SingleSource/UnitTests/Integer/bigint.reference_output
diff -u llvm-test/SingleSource/UnitTests/Integer/bigint.reference_output:1.2
llvm-test/SingleSource/UnitTests/Integer/bigint.reference_output:1.3
--- llvm-test/SingleSource/UnitTests/Integer/bigint.reference_output:1.2
Wed Apr 18 00:40:12 2007
+++ llvm-test/SingleSource/UnitTests/Integer/bigint.reference_outputMon May
14 13:43:28 2007
@@ -1,3 +1,14 @@
-rem = 54392
-rem2 = 143376
+Initially:
+int500 x =
+int169 y =
101010111001100100010
+
+After modification:
+int500 x =
0001
+int169 y =
101010111000100110011
+
+result = x * y =
01010100110110110001011101101
+
+result % 0x37015 = -221497
+
+result % -198721 = -187511
exit 0
___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits