On 12/4/25 10:18 AM, Dimitar Dimitrov wrote:
On Thu, Dec 04, 2025 at 03:27:53PM +0100, Jan Hubicka wrote:
Starting with r16-4438-ga93f80feeef744, the edges started to be sorted
in ascending order.  Thus the most likely branches were deprioritized
instead of optimized to fallthroughs.

Fix by restoring the sorting order prior to r16-4438-ga93f80feeef744.

There are no regressions for C and C++ on x86_64-pc-linux-gnu.

The new tests fail for the respective targets without this patch, and
pass with it.

        PR rtl-optimization/122675

gcc/ChangeLog:

        * bb-reorder.cc (edge_order): Fix BB edge ordering to be
        descending.

gcc/testsuite/ChangeLog:

        * gcc.target/aarch64/pr122675-1.c: New test.
        * gcc.target/i386/pr122675-1.c: New test.
        * gcc.target/riscv/pr122675-1.c: New test.

This is OK.
Thanks for cathing this and sorry for late reply - I was organizing a workshop.

Honza

Thank you Honza. Could you please confirm that you prefer this version,
and not the latter [V3] where I addressed Jeff's concerns?
Given Honza knows this code *far* better than I, if he's OK, then don't worry about any of my concerns.

jeff

Reply via email to