]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
avoid-store-forwarding: Fix wrong counter in statistics reporting
authorPhilipp Tomsich <philipp.tomsich@vrull.eu>
Mon, 23 Feb 2026 10:04:52 +0000 (11:04 +0100)
committerPhilipp Tomsich <philipp.tomsich@vrull.eu>
Wed, 25 Feb 2026 22:01:39 +0000 (23:01 +0100)
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 <konstantinos.eleftheriou@vrull.eu>
gcc/avoid-store-forwarding.cc

index 52235b14dc0df2a7fb7beb40b59454d8b7086080..33446beb0091ab14ebf876c976447436731dd575 100644 (file)
@@ -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