[llvm-bugs] [Bug 37062] New: Clang should support _BitscanForward and _BitscanForward64 in constant expressions

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Apr 9 13:48:39 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=37062

            Bug ID: 37062
           Summary: Clang should support _BitscanForward and
                    _BitscanForward64 in constant expressions
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: billy.oneal at gmail.com
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org

In MSVC++'s STL, we implemented binary GCD as this can be faster, as it
replaces divisions with bsf. Unfortunately, right now we had to fake bsf with a
loop, resulting in std::gcd actually being slower than a naïve Euclid's
algorithm implementation. This could be substantially faster with real bsf.

Note that C1XX doesn't currently support _BitscanForward in constexpr contexts;
this bug is being filed at the same time it's being filed against C1XX (and
EDG).

-- 
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/20180409/efa96947/attachment-0001.html>


More information about the llvm-bugs mailing list