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 = 0xffffffffULL; +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_output Mon May 14 13:43:28 2007 @@ -1,3 +1,14 @@ -rem = 54392 -rem2 = 143376 +Initially: +int500 x = 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 +int169 y = 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101010100001100100001000000100010 + +After modification: +int500 x = 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111111 +int169 y = 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101010100001100000001001100100001 + +result = x * y = 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101010100100001011111101100010111011011111 + +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