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 179346 lib/Transforms/Utils/SimplifyLibCalls.cpp
test/Transforms/InstCombine/memchr.ll
test/Transforms/InstCombine/strchr-1.ll
|