[PATCH] D55947: [SimplifyLibCalls] Fix memchr expansion for constant strings.
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 20 12:21:56 PST 2018
efriedma created this revision.
efriedma added reviewers: bkramer, spatel.
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.
Fixes https://bugs.llvm.org/show_bug.cgi?id=39041 .
Repository:
rL LLVM
https://reviews.llvm.org/D55947
Files:
lib/Transforms/Utils/SimplifyLibCalls.cpp
test/Transforms/InstCombine/memchr.ll
test/Transforms/InstCombine/strchr-1.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55947.179120.patch
Type: text/x-patch
Size: 5702 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181220/ec1b574d/attachment.bin>
More information about the llvm-commits
mailing list