[llvm-commits] CVS: llvm-test/SingleSource/UnitTests/2005-05-11-Popcount-ffs-fls.c
Chris Lattner
lattner at cs.uiuc.edu
Thu May 12 12:36:36 PDT 2005
Changes in directory llvm-test/SingleSource/UnitTests:
2005-05-11-Popcount-ffs-fls.c updated: 1.1 -> 1.2
---
Log message:
Add tests for the 64-bit versions as well
---
Diffs of the changes: (+10 -0)
2005-05-11-Popcount-ffs-fls.c | 10 ++++++++++
1 files changed, 10 insertions(+)
Index: llvm-test/SingleSource/UnitTests/2005-05-11-Popcount-ffs-fls.c
diff -u llvm-test/SingleSource/UnitTests/2005-05-11-Popcount-ffs-fls.c:1.1 llvm-test/SingleSource/UnitTests/2005-05-11-Popcount-ffs-fls.c:1.2
--- llvm-test/SingleSource/UnitTests/2005-05-11-Popcount-ffs-fls.c:1.1 Wed May 11 02:08:55 2005
+++ llvm-test/SingleSource/UnitTests/2005-05-11-Popcount-ffs-fls.c Thu May 12 14:36:19 2005
@@ -47,6 +47,7 @@
int i;
int main(void) {
+ long long l;
for(i=-10; i<139045193; i*=-3) {
printf("LLVM: n: %d, clz(n): %d, popcount(n): %d, ctz(n): %d\n",
@@ -57,6 +58,15 @@
i++;
}
+ for(l=-10000; l<139045193*10000LL; l*=-3) {
+ printf("LLVM: n: %lld, clz(n): %d, popcount(n): %d, ctz(n): %d\n",
+ l, __builtin_clzll(l), __builtin_popcountll(l), __builtin_ctz(l));
+ printf("REF LO BITS : n: %lld, clz(n): %d, popcount(n): %d, ctz(n): %d\n",
+ l, nlz10b(l), pop(l), ntz8(l));
+ printf(" *** \n");
+ l++;
+ }
+
return(0);
}
More information about the llvm-commits
mailing list