------- Comment #4 from law at redhat dot com  2010-05-11 05:31 -------
I doubt my work will make a significant difference for this test.

We're trying to reload an insn which matches:


(define_insn "*add<mode>3_cconly_overflow"
  [(set (reg:CCC FLAGS_REG)
        (compare:CCC
          (plus:SWI
            (match_operand:SWI 1 "nonimmediate_operand" "%0")
            (match_operand:SWI 2 "<general_operand>" "<r><i>m"))
          (match_dup 1)))
   (clobber (match_scratch:SWI 0 "=<r>"))]
  "ix86_binary_operator_ok (PLUS, <MODE>mode, operands)"
  "add{<imodesuffix>}\t{%2, %0|%0, %2}"
  [(set_attr "type" "alu")
   (set_attr "mode" "<MODE>")])

(gdb) p debug_reload()
Reload 0: reload_in (SI) = (reg:SI 6 bp)
        reload_out (SI) = (scratch:SI)
        GENERAL_REGS, RELOAD_OTHER (opnum = 0), can't combine
        reload_in_reg: (subreg:SI (reg:DI 6 bp [orig:66 D.2764 ] [66]) 0)
        reload_out_reg: (scratch:SI)
$14 = void
(gdb) p debug_rtx (insn)
(insn 25 24 26 5 j.c:26 (parallel [
            (set (reg:CCC 17 flags)
                (compare:CCC (plus:SI (subreg:SI (reg:DI 6 bp [orig:66 D.2764 ]
[66]) 0)
                        (reg:SI 3 bx [orig:58 D.2737 ] [58]))
                    (subreg:SI (reg:DI 6 bp [orig:66 D.2764 ] [66]) 0)))
            (clobber (scratch:SI))
        ]) 316 {*addsi3_cconly_overflow} (expr_list:REG_DEAD (reg:DI 6 bp
[orig:66 D.2764 ] [66])
        (expr_list:REG_DEAD (reg:SI 3 bx [orig:58 D.2737 ] [58])
            (nil))))

I think the only way to satisfy this reload is to allocate the scratch to
(subreg: SI (reg:DI 6))  I have no clue why reload doesn't do that.  


-- 

law at redhat dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |law at redhat dot com


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

Reply via email to