]> git.ipfire.org Git - thirdparty/gcc.git/commit
forwprop: Factor out memchr optimization to its own function
authorAndrew Pinski <andrew.pinski@oss.qualcomm.com>
Sat, 6 Sep 2025 10:40:51 +0000 (03:40 -0700)
committerAndrew Pinski <andrew.pinski@oss.qualcomm.com>
Sat, 6 Sep 2025 20:19:56 +0000 (13:19 -0700)
commitffc25308acf736db769e980c3b1ba2f6f9148b2a
tree1eccb0d4100ebe4cb050dd2f22795d50f9d954c7
parent8ab5b7f590938a878845156a8da5f25731e9dff6
forwprop: Factor out memchr optimization to its own function

As more optimizations are added to forwprop's simplify_builtin_call,
this function is becoming harder and harder to understand. To help
simplify things, this factors out the memchr optimization to its own
function like what was done when memcmp optimization was added.

Bootstrapped and tested on x86_64-linux-gnu.

gcc/ChangeLog:

* tree-ssa-forwprop.cc (simplify_builtin_call): Factor out the memchr
optimization to ...
(simplify_builtin_memchr): Here. New function.

Signed-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
gcc/tree-ssa-forwprop.cc