[InstCombine] Fold memchr and strchr equality with first argument
Enhance memchr and strchr handling to simplify calls to the functions used in equality expressions with the first argument to at most two integer comparisons: - memchr(A, C, N) == A to N && *A == C for either a dereferenceable A or a nonzero N, - strchr(S, C) == S to *S == C for any S and C, and - strchr(S, '\0') == 0 to true for any S Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D128939
parent
e3611f82
Please register or sign in to comment