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]>
---
 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
-- 
2.34.1

Reply via email to