[llvm-bugs] [Bug 52272] New: Use SIMD to expand memchr

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Oct 23 09:04:54 PDT 2021


            Bug ID: 52272
           Summary: Use SIMD to expand memchr
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: david.bolvansky at gmail.com
                CC: craig.topper at gmail.com, llvm-bugs at lists.llvm.org,
                    llvm-dev at redking.me.uk, pengfei.wang at intel.com,
                    spatel+llvm at rotateright.com

int* findK(int k, const int* v, unsigned long long n)
  return(int*)__builtin_memchr(v, k, 32);

findK(int, int const*, unsigned long long):
        mov     r8d, edi
        mov     edx, 32
        mov     rdi, rsi
        mov     esi, r8d
        jmp     memchr

Better to use SIMD than libcall for some reasonable N?

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/20211023/2ce7c8e8/attachment.html>

More information about the llvm-bugs mailing list