This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

reload question

My port supports hardware loops generated by the following (do_end) pattern: 

(set (pc) (if_then_else (ne (match_operand:HI 0 "general_register_operand" "d")
                           (const_int 0))
                       (label_ref (match_operand 1 "" ""))
     (set  (match_operand:HI 2 "general_register_operand" "=0")
         (plus:HI (match_operand:HI 3 "general_register_operand" "0")
                          (const_int -1)))
    (clobber (match_operand:BI 4 "predicate_register_operand" "=j"))

When Im compiling a loop with high register pressure the register allocator does not allocate a register for the loop counter (i.e., operand 0) as it has a long life range. Thus operand 0 has to be reloaded but then I get a failure in the reload:

error: unable to generate reloads for:
(jump_insn 211 182 188 11 lib5.c:51 (parallel [
            (set (pc)
                (if_then_else (ne (reg:HI 292 [ N ])
                        (const_int 0 [0x0]))
                    (label_ref 183)
            (set (reg:HI 292 [ N ])
                (plus:HI (reg:HI 292 [ N ])
                    (const_int -1 [0xffffffffffffffff])))
            (clobber (reg:BI 33 p1 [293]))
        ]) 506 {do_endhi} (expr_list:REG_UNUSED (reg:BI 33 p1 [293])
        (expr_list:REG_BR_PROB (const_int 9100 [0x238c])
 -> 183)
lib5.c:105:1: internal compiler error: in find_reloads, at reload.c:3821

Can anybody give me a hint?
I am aware of the following msg:
but still dont know how to make reload do the work.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]