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: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]
                CC: [email protected]


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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to