llvm-project/llvm/lib/Transforms/AggressiveInstCombine
Yingwei Zheng f58cfacfaf
[AggressiveInstCombine] Expand memchr with small constant strings (#98501)
This patch converts memchr with a small constant string into a switch.
It will reduce overhead of libcall and enable more folds (e.g.,
comparing the result with null).

References: https://en.cppreference.com/w/c/string/byte/memchr
2024-07-17 00:25:36 +08:00
..