Commit 5ccfd5f6 authored by Martin Sebor's avatar Martin Sebor Committed by Nikita Popov
Browse files

[SimplifyLibCalls] Optimize memchr() with known char+str and unknown length

If both the character and string are known, but the length
potentially isn't, we can optimize the memchr() call to a select
of either the known position of the character or null.

Split off from https://reviews.llvm.org/D122836.
parent 5197d279
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment