[Bug rtl-optimization/56339] [4.8 Regression]: Suboptimal register allocation

steven at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Feb 15 10:17:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56339

--- Comment #3 from Steven Bosscher <steven at gcc dot gnu.org> 2013-02-15 10:17:19 UTC ---
Before regmove, both input operands die in insn 12:
   12: r67:DF=r66:DF+r64:DF
      REG_DEAD r66:DF
      REG_DEAD r64:DF

and because reg classes haven't been set up, r66 and r67 both have
GENERAL_REGS as their preferred register class so regmove doesn't see
that r64 and r67 share the same preferred register %xmm0:

Breakpoint 1, regmove_backward_pass () at ../../trunk/gcc/regmove.c:1088
1088                  if (dump_file)
(gdb) p reg_preferred_class (64) 
$10 = GENERAL_REGS
(gdb) p reg_preferred_class (66)
$11 = GENERAL_REGS
(gdb) p reg_preferred_class (67)
$12 = GENERAL_REGS
(gdb) p ira_set_pseudo_classes (true, dump_file)
$13 = void
(gdb) p reg_preferred_class (64)
$14 = SSE_FIRST_REG
(gdb) p reg_preferred_class (66)
$15 = SSE_REGS
(gdb) p reg_preferred_class (67)
$16 = SSE_FIRST_REG
(gdb)



More information about the Gcc-bugs mailing list