The C standard says "The memchr function locates the first occurrence of c (converted to an unsigned char)[...]". The expansion was missing the conversion to unsigned char.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Paths
| Differential D55947
[SimplifyLibCalls] Fix memchr expansion for constant strings. ClosedPublic Authored by efriedma on Dec 20 2018, 12:21 PM.
Details Summary The C standard says "The memchr function locates the first occurrence of c (converted to an unsigned char)[...]". The expansion was missing the conversion to unsigned char.
Diff Detail
Event TimelineThis revision is now accepted and ready to land.Dec 21 2018, 1:53 PM Closed by commit rL350775: [SimplifyLibCalls] Fix memchr expansion for constant strings. (authored by efriedma). · Explain WhyJan 9 2019, 3:43 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 180952 llvm/trunk/lib/Transforms/Utils/SimplifyLibCalls.cpp
llvm/trunk/test/Transforms/InstCombine/memchr.ll
llvm/trunk/test/Transforms/InstCombine/strchr-1.ll
|