[llvm-commits] CVS: llvm-test/SingleSource/UnitTests/Integer/APInt/arith.cpp
Zhou Sheng
zhousheng00 at gmail.com
Wed Feb 14 22:29:37 PST 2007
Changes in directory llvm-test/SingleSource/UnitTests/Integer/APInt:
arith.cpp updated: 1.6 -> 1.7
---
Log message:
Fix some errors.
---
Diffs of the changes: (+4 -5)
arith.cpp | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
Index: llvm-test/SingleSource/UnitTests/Integer/APInt/arith.cpp
diff -u llvm-test/SingleSource/UnitTests/Integer/APInt/arith.cpp:1.6 llvm-test/SingleSource/UnitTests/Integer/APInt/arith.cpp:1.7
--- llvm-test/SingleSource/UnitTests/Integer/APInt/arith.cpp:1.6 Tue Feb 13 21:38:26 2007
+++ llvm-test/SingleSource/UnitTests/Integer/APInt/arith.cpp Thu Feb 15 00:29:21 2007
@@ -41,8 +41,8 @@
printf("APInt::getMinValue(%d, false) = %s\n", bitwidth, str(umin));
APInt null = APInt::getNullValue(bitwidth);
APInt allone = APInt::getAllOnesValue(bitwidth);
- printf("APInt::getNullValue(%d) = %s\n", bitwidth, str(umin));
- printf("APInt::getAllOnesValue(%d) = %s\n", bitwidth, str(umin));
+ printf("APInt::getNullValue(%d) = %s\n", bitwidth, str(null));
+ printf("APInt::getAllOnesValue(%d) = %s\n", bitwidth, str(allone));
APInt x(val);
x.set(pos);
printf("val.set(%d) = %s\n", pos, str(x));
@@ -62,7 +62,7 @@
unsigned bitsize = bitwidth / 2;
printf("val.HiBits(%d) = %s\n", bitsize, str(val.HiBits(bitsize)));
printf("val.LoBits(%d) = %s\n", bitsize, str(val.LoBits(bitsize)));
- printf("val.IsIntN(%d) = %d\n", bitsize, str(val.IsIntN(bitsize)));
+ printf("val.IsIntN(%d) = %d\n", bitwidth, val.IsIntN(bitwidth));
}
void test_unops(const APInt &val) {
@@ -91,8 +91,7 @@
printf("val.CountPopulation() = %d\n", val.CountPopulation());
printf("val.getNumBits() = %d\n", val.getNumBits());
if (val.getNumBits() >= 16 && val.getNumBits() % 16 == 0) {
- // FIXME: ByteSwap crashes!
- // x = val.ByteSwap();
+ x = val.ByteSwap();
printf("val.ByteSwap() = %d\n", str(x));
}
printf("val.RoundToDouble(true) %d = %f\n", val.RoundToDouble(true));
More information about the llvm-commits
mailing list