RESOLVED WONTFIX 212053
Optimize clz() and ctz() for ARM64.
https://bugs.webkit.org/show_bug.cgi?id=212053
Summary Optimize clz() and ctz() for ARM64.
Mark Lam
Reported 2020-05-18 16:36:06 PDT
...
Attachments
proposed patch. (3.88 KB, patch)
2020-05-18 16:51 PDT, Mark Lam
rmorisset: review+
Radar WebKit Bug Importer
Comment 1 2020-05-18 16:37:09 PDT
Mark Lam
Comment 2 2020-05-18 16:51:05 PDT
Created attachment 399683 [details] proposed patch.
Robin Morisset
Comment 3 2020-05-18 16:53:14 PDT
Comment on attachment 399683 [details] proposed patch. r=me
Mark Lam
Comment 4 2020-05-18 21:38:12 PDT
Yusuke pointed out that it may not be safe for me to use the builtin without the null check. This is because the compiler may make assumptions about the incoming value not being null if I elide the check. As a result, I used an inline asm statement instead to implement the equivalent of the builtin. However, using the inline asm statement seems to block Clang from applying some optimizations (e.g. loop unrolling). As a result, perf was actually worse with the inline asm statement. Given the microbenchmark results I'm seeing, I think this change is not worth making.
Note You need to log in before you can comment on or make changes to this bug.