[SimplifyLibCalls] Transform memchr(STR, C, N) to chain of ORs
Motivation: ``` #include <string_view> size_t findFirst_ABCDEF(std::string_view sv) { return sv.find_first_of("ABCDEF"); } ``` memchr("ABCDEF", C, 6) != NULL -> (C == 'A' || C == 'B' || C == 'C' || C == 'D' || C == 'E' || C == 'F') != 0 Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D128011
Loading
Please sign in to comment