Skip to content
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
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment