aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-01-24 18:42:21 -0800
committerAlon Zakai <alonzakai@gmail.com>2013-01-24 18:42:21 -0800
commitbcc6c3fa9e54f2897246bde4cea947fe20432997 (patch)
tree59e0562a9b99df0da418c91d66fc9c234558ca6f /tests
parent2fed70d63e48e72ceef88e35c1b33a91a28e400a (diff)
optimize ctlz and add cttz; fixes #797
Diffstat (limited to 'tests')
-rwxr-xr-xtests/runner.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py
index 4e79f7e9..58a79a9c 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -1220,6 +1220,8 @@ m_divisor is 1091269979
extern unsigned int llvm_bswap_i32(unsigned int x);
extern int32_t llvm_ctlz_i32(int32_t x);
extern int64_t llvm_ctlz_i64(int64_t x);
+ extern int32_t llvm_cttz_i32(int32_t x);
+ extern int64_t llvm_cttz_i64(int64_t x);
extern int llvm_expect_i32(int x, int y);
}
@@ -1235,6 +1237,7 @@ m_divisor is 1091269979
printf("%x,%x,%x,%x\n", y&0xff, (y>>8)&0xff, (y>>16)&0xff, (y>>24)&0xff);
printf("%d,%d\n", (int)llvm_ctlz_i64(((int64_t)1) << 40), llvm_ctlz_i32(1<<10));
+ printf("%d,%d\n", (int)llvm_cttz_i64(((int64_t)1) << 40), llvm_cttz_i32(1<<10));
printf("%d\n", llvm_expect_i32(x % 27, 3));
@@ -1250,6 +1253,7 @@ c8,ef
8a,15,de,c5
c5,de,15,8a
23,21
+40,10
13
72057594037927936
''')