movQI constraints force load of register with immediate to registers R16-R31
However, load of zero can use any register.

Due to this register allocation is sub optimal.

Offend entry is
(define_insn "*movqi"
  [(set (match_operand:QI 0 "nonimmediate_operand" "=r,d,Qm,r,q,r,*r")
        (match_operand:QI 1 "general_operand"       "r,i,rL,Qm,r,q,i"))]

which should be:

(define_insn "*movqi"
  [(set (match_operand:QI 0 "nonimmediate_operand" "=r,d,Qm,r,q,r,*r")
        (match_operand:QI 1 "general_operand"       "rL,i,rL,Qm,r,q,i"))]


-- 
           Summary: Missed optimsation of QI register loads
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hutchinsonandy at gcc dot gnu dot org
GCC target triplet: avr-unknown-none


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

Reply via email to