https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104054
--- Comment #5 from Uroš Bizjak <ubizjak at gmail dot com> --- Could be a red herring, but in _.rnreg dump: Register r9 (1): 75 [GENERAL_REGS] 18 [ALL_REGS] 97 [GENERAL_REGS] Register r10 (1): 76 [GENERAL_REGS] 18 [ALL_REGS] 23 [GENERAL_REGS] ... Register di (1): 55 [ALL_REGS] the pass w/ -g also records hard registers in debug insns. Probably this drives some decisions to make different choices with respect to register renaming.