[llvm-bugs] [Bug 31802] New: Count Leading Ones does not work properly on ARMv8 (should lower to CLS) ?
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Jan 30 11:13:17 PST 2017
https://llvm.org/bugs/show_bug.cgi?id=31802
Bug ID: 31802
Summary: Count Leading Ones does not work properly on ARMv8
(should lower to CLS) ?
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: LLVM Codegen
Assignee: unassignedclangbugs at nondot.org
Reporter: gonzalobg88 at gmail.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
One can implement count leading ones (or count leading significant bits) as
follows:
unsigned cls(unsigned i) {
return __builtint_clz(!i);
}
I would expect this code to generate the cls instruction on aarch64 but i don't
seem to be able to generate this instruction at all.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170130/b5674d08/attachment.html>
More information about the llvm-bugs
mailing list