Motivation: https://godbolt.org/z/yAkD8B - Both functions should produce same codegen.
Solution: Build chain of OR comparisons and rely on InstSimplify/InstCombine to clean up the chain.
memchr("abcd", C, 4) != NULL -> (C == 'a' | C == 'b' | C == 'c' | C == 'd') != 0
Unrelated: Even if it is not only checked against null we can do this and add a nonnull result to the string pointer, right?