[LLVMbugs] [Bug 2852] New: fold load (strchr/memchr ptr, c) --> c

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Thu Oct 2 22:37:24 PDT 2008


http://llvm.org/bugs/show_bug.cgi?id=2852

           Summary: fold load (strchr/memchr ptr, c) --> c
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Scalar Optimizations
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: nicholas at mxc.ca
                CC: llvmbugs at cs.uiuc.edu


The pointer returned by the strchr/memchr family is usually tested for validity
(null-ness) and then dereferenced, possibly as part of a loop.

We know the value that the pointer points to; it's the one passed in to as the
second parameter to the function call.

There's no LLVM intrinsic for memchr though. Where should this sort of thing be
done? In simplify-libcalls?


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list