https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116650
Bug ID: 116650 Summary: Regrename creates conflict with register pair Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: sch...@linux-m68k.org Target Milestone: --- Target: m68k-*-* Created attachment 59081 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59081&action=edit inline_matmul_14.f90 $ gcc/xgcc -B gcc/ inline_matmul_14.f90 -O -funroll-loops -S -fverbose-asm -mlra fmove.d 156(%sp),%fp4 | %sfp, _805 fmul.x %fp7,%fp4 | _1024, _805 fmove.d %fp4,-(%sp) | _805 move.l (%sp)+,%d1 | _805 move.l (%sp)+,%d2 | fmove.x %fp4,%fp5 | _805, _805 fadd.d 244(%sp),%fp5 | %sfp, _805 fmove.d %fp5,320(%sp) | _805, __var_3_matmul[1] %d2 is used for holding the pointer to a local variable around this place, and is overwritten here. After reload: (insn 575 797 299 4 (set (reg:DF 20 %fp4 [orig:331 _805 ] [331]) (mem/c:DF (plus:SI (reg/f:SI 15 %sp) (const_int 156 [0x9c])) [20 %sfp+-1036 S8 A16])) "inline_matmul_14.f90":41:74 discrim 35 69 {*m68k.md:1355} (nil)) (insn 299 575 576 4 (set (reg:DF 20 %fp4 [orig:331 _805 ] [331]) (mult:DF (reg:DF 20 %fp4 [orig:331 _805 ] [331]) (reg:DF 23 %fp7 [orig:184 _1024 ] [184]))) "inline_matmul_14.f90":41:74 discrim 35 220 {muldf_68881} (nil)) (insn 576 299 577 4 (set (reg:DF 16 %fp0 [orig:331 _805 ] [331]) (reg:DF 20 %fp4 [orig:331 _805 ] [331])) "inline_matmul_14.f90":41:74 discrim 35 69 {*m68k.md:1355} (nil)) (insn 577 576 579 4 (set (reg:DF 21 %fp5 [orig:331 _805 ] [331]) (reg:DF 16 %fp0 [orig:331 _805 ] [331])) "inline_matmul_14.f90":41:74 discrim 35 69 {*m68k.md:1355} (nil)) After regrename: (insn 575 797 299 4 (set (reg:DF 20 %fp4 [orig:331 _805 ] [331]) (mem/c:DF (plus:SI (reg/f:SI 15 %sp) (const_int 156 [0x9c])) [20 %sfp+-1036 S8 A16])) "inline_matmul_14.f90":41:74 discrim 35 69 {*m68k.md:1355} (nil)) (insn 299 575 576 4 (set (reg:DF 20 %fp4 [orig:331 _805 ] [331]) (mult:DF (reg:DF 20 %fp4 [orig:331 _805 ] [331]) (reg:DF 23 %fp7 [orig:184 _1024 ] [184]))) "inline_matmul_14.f90":41:74 discrim 35 220 {muldf_68881} (nil)) (insn 576 299 577 4 (set (reg:DF 1 %d1 [orig:331 _805 ] [331]) (reg:DF 20 %fp4 [orig:331 _805 ] [331])) "inline_matmul_14.f90":41:74 discrim 35 69 {*m68k.md:1355} (expr_list:REG_DEAD (reg:DF 20 %fp4 [orig:331 _805 ] [331]) (nil))) (insn 577 576 579 4 (set (reg:DF 21 %fp5 [orig:331 _805 ] [331]) (reg:DF 1 %d1 [orig:331 _805 ] [331])) "inline_matmul_14.f90":41:74 discrim 35 69 {*m68k.md:1355} (expr_list:REG_DEAD (reg:DF 16 %fp0 [orig:331 _805 ] [331]) (nil))) This looks similar to PR115860.