[llvm-commits] CVS: llvm-test/SingleSource/UnitTests/Integer/bigint.c bigint.reference_output

2007-05-14 Thread Reid Spencer


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


[llvm-commits] CVS: llvm-test/SingleSource/UnitTests/Integer/bigint.c bigint.reference_output

2007-04-17 Thread Reid Spencer


Changes in directory llvm-test/SingleSource/UnitTests/Integer:

bigint.c updated: 1.7 - 1.8
bigint.reference_output updated: 1.1 - 1.2
---
Log message:

Try bigger integer bit widths.


---
Diffs of the changes:  (+3 -3)

 bigint.c|2 +-
 bigint.reference_output |4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)


Index: llvm-test/SingleSource/UnitTests/Integer/bigint.c
diff -u llvm-test/SingleSource/UnitTests/Integer/bigint.c:1.7 
llvm-test/SingleSource/UnitTests/Integer/bigint.c:1.8
--- llvm-test/SingleSource/UnitTests/Integer/bigint.c:1.7   Tue Apr 17 
19:53:49 2007
+++ llvm-test/SingleSource/UnitTests/Integer/bigint.c   Wed Apr 18 00:40:12 2007
@@ -17,7 +17,7 @@
 const uint10 bnd = 1023;
 
 
-int169 x = 0xULL;
+int500 x = 0xULL;
 int169 y = -0xabcdefdeULL;
 
 int my_test()


Index: llvm-test/SingleSource/UnitTests/Integer/bigint.reference_output
diff -u llvm-test/SingleSource/UnitTests/Integer/bigint.reference_output:1.1 
llvm-test/SingleSource/UnitTests/Integer/bigint.reference_output:1.2
--- llvm-test/SingleSource/UnitTests/Integer/bigint.reference_output:1.1
Thu Jan 18 20:22:46 2007
+++ llvm-test/SingleSource/UnitTests/Integer/bigint.reference_outputWed Apr 
18 00:40:12 2007
@@ -1,3 +1,3 @@
-rem = -56805
-rem2 = -97569
+rem = 54392
+rem2 = 143376
 exit 0



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits