]> git.ipfire.org Git - thirdparty/gcc.git/commit
fab/forwprop: Move memcmp->memcmp_eq to forwprop
authorAndrew Pinski <andrew.pinski@oss.qualcomm.com>
Sat, 20 Sep 2025 06:02:35 +0000 (23:02 -0700)
committerAndrew Pinski <andrew.pinski@oss.qualcomm.com>
Fri, 3 Oct 2025 14:01:02 +0000 (07:01 -0700)
commit554a54b97ea935802bc66679ebb882ad61adf897
treee66d8b86913d2b25d057bc44f05c89d4ec28f4c4
parentb989a663a5f268866a4d98cc3751ae0678fc394b
fab/forwprop: Move memcmp->memcmp_eq to forwprop

This moves from the memcmp->memcmp_eq to forwprop by
checking PROP_last_full_fold.

Note this means at -Og, we no longer optimize some
memcmp. That will be fixed when I exchange fab/copyprop
for a (late) forwprop.

Bootstrapped and tested on x86_64-linux-gnu.

gcc/ChangeLog:

* tree-ssa-ccp.cc (optimize_memcmp_eq): Remove.
(pass_fold_builtins::execute): Remove handling of memcmp.
* tree-ssa-forwprop.cc (simplify_builtin_memcmp): Add folding
of memcmp to memcmp_eq for PROP_last_full_fold.

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