https://gcc.gnu.org/g:34fb8d51318c3c2c7fe6186ae5c680349c342e62
commit r16-7703-g34fb8d51318c3c2c7fe6186ae5c680349c342e62 Author: Philipp Tomsich <[email protected]> Date: Mon Feb 23 11:04:52 2026 +0100 avoid-store-forwarding: Fix wrong counter in statistics reporting update_stats() reported stats_sf_detected for both the "detected" and "avoided" counters. The second should report stats_sf_avoided. gcc/ChangeLog: * avoid-store-forwarding.cc (store_forwarding_analyzer::update_stats): Use stats_sf_avoided for the "avoided" counter. Reviewed-By: Konstantinos Eleftheriou <[email protected]> Diff: --- gcc/avoid-store-forwarding.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/avoid-store-forwarding.cc b/gcc/avoid-store-forwarding.cc index 52235b14dc0d..33446beb0091 100644 --- a/gcc/avoid-store-forwarding.cc +++ b/gcc/avoid-store-forwarding.cc @@ -714,7 +714,7 @@ store_forwarding_analyzer::update_stats (function *fn) statistics_counter_event (fn, "Cases of store forwarding detected: ", stats_sf_detected); statistics_counter_event (fn, "Cases of store forwarding avoided: ", - stats_sf_detected); + stats_sf_avoided); } unsigned int
