https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122767
--- Comment #8 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Alexandre Oliva <[email protected]>: https://gcc.gnu.org/g:ee8a5c03f6d94da0c9b7f4495915647c84478af5 commit r16-5566-gee8a5c03f6d94da0c9b7f4495915647c84478af5 Author: Alexandre Oliva <[email protected]> Date: Mon Nov 24 20:07:20 2025 -0300 ira: sort allocno_hard_regs by regset Using hashes of data structures for tie breaking makes sorting dependent on type sizes, padding, and endianness, i.e., unstable across different hosts. ira-color.cc's allocno_hard_regs_compare does that, and it causes different register allocations to be chosen for the same target depending on the host. That's undesirable. Compare the HARD_REG_SETs directly instead, looking for the lowest-numbered difference register to use as the tie breaker for the cost compare. With a hardware implementation of ctz, this is likely faster than the hash used to break ties before. for gcc/ChangeLog PR rtl-optimization/122767 * ira-color.cc (allocno_hard_regs_compare): Break ties using... * hard-reg-set.h (hard_reg_set_first_diff): ... this. New HARD_REG_SET API entry point.
