https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103550

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to cqwrteur from comment #4)
> (In reply to Andrew Pinski from comment #2)
> > Looks like it is a register allocation/scheduling issue. The extra
> > instructions are mov.
> 
> Are there good algos that can allocate registers optimal?

note the move instructions might be "free" on most modern x86 machine, it just
takes up icache space and decode time.
having so little registers and having a 2 operand instruction set makes
register allocation a hard problem really. Yes LLVM might get it right in this
testcase but there are others where GCC might do a better job.

Reply via email to