------- Comment #28 from danglin at gcc dot gnu dot org  2006-07-28 21:51 
-------
I've been trying to figure out why we end up with the strange intialization for
the
parity loop.  I see this rtl in the loop2 dump:

;; Start of basic block 7, registers live: (nil)
(code_label 57 56 108 7 47 "" [1 uses])

(note 108 57 58 7 [bb 7] NOTE_INSN_BASIC_BLOCK)

(insn 58 108 111 7 (set (reg:SI 129)
        (and:SI (subreg:SI (reg:DI 113) 4)
            (const_int 1 [0x1]))) 126 {andsi3} (nil)
    (nil))

(insn 111 58 112 7 (set (reg:SI 136)
        (ne:SI (reg:SI 129)
            (const_int 0 [0x0]))) 4 {scc} (nil)
    (nil))

(insn 112 111 67 7 (set (reg/v:SI 108 [ count ])
        (plus:SI (reg/v:SI 108 [ count ])
            (reg:SI 136))) 114 {addsi3} (nil)
    (nil))

(insn 67 112 68 7 (set (reg/v:SI 109 [ i ])
        (plus:SI (reg/v:SI 109 [ i ])
            (const_int 1 [0x1]))) 114 {addsi3} (nil)
    (nil))
(insn 68 67 69 7 (set (reg:SI 130)
        (const_int 64 [0x40])) 37 {*pa.md:2482} (nil)
    (nil))

(jump_insn 69 68 71 7 (set (pc)
        (if_then_else (ne (reg/v:SI 109 [ i ])
                (reg:SI 130))
            (label_ref 27)
            (pc))) 25 {*pa.md:1710} (nil)
    (expr_list:REG_EQUAL (if_then_else (ne (reg/v:SI 109 [ i ])
                (const_int 64 [0x40]))
            (label_ref 27)
            (pc))
        (expr_list:REG_BR_PROB (const_int 9844 [0x2674])
            (nil))))
;; End of basic block 7, registers live:
 (nil)

;; Start of basic block 8, registers live: (nil)
(note 71 69 73 8 [bb 8] NOTE_INSN_BASIC_BLOCK)
(insn 73 71 74 8 (set (reg:DI 25 %r25 [ D.1497 ])
        (reg:DI 110 [ D.1497 ])) 77 {*pa.md:4458} (nil)
    (insn_list:REG_LIBCALL 75 (nil)))

(call_insn/u 74 73 75 8 (parallel [
            (set (reg:SI 28 %r28)
                (call (mem:SI (symbol_ref/v:SI ("@__paritydi2") [flags 0x41]) [
0 S4 A32])
                    (const_int 64 [0x40])))
            (clobber (reg:SI 1 %r1))
            (clobber (reg:SI 2 %r2))
            (use (const_int 0 [0x0]))
        ]) 210 {call_val_symref} (nil)
    (expr_list:REG_EH_REGION (const_int -1 [0xffffffff])
        (nil))
    (expr_list:REG_DEP_TRUE (use (reg:DI 25 %r25 [ D.1497 ]))
        (nil)))

This gets transformed to the following rtl in the loop2_init dump:

;; Start of basic block 7, registers live: (nil)
(code_label 57 56 108 7 47 "" [0 uses])

(note 108 57 58 7 [bb 7] NOTE_INSN_BASIC_BLOCK)

(insn 58 108 111 7 (set (reg:SI 129)
        (and:SI (subreg:SI (reg:DI 113) 4)
            (const_int 1 [0x1]))) 126 {andsi3} (nil)
    (nil))

(insn 111 58 112 7 (set (reg:SI 136)
        (ne:SI (reg:SI 129)
            (const_int 0 [0x0]))) 4 {scc} (nil)
    (nil))

(insn 112 111 67 7 (set (reg/v:SI 108 [ count ])
        (plus:SI (reg/v:SI 108 [ count ])
            (reg:SI 136))) 114 {addsi3} (nil)
    (nil))

(insn 67 112 68 7 (set (reg/v:SI 109 [ i ])
        (plus:SI (reg/v:SI 109 [ i ])
            (const_int 1 [0x1]))) 114 {addsi3} (nil)
    (nil))

(insn 68 67 69 7 (set (reg:SI 130)
        (const_int 64 [0x40])) 37 {*pa.md:2482} (nil)
    (nil))

(jump_insn 69 68 116 7 (set (pc)
        (if_then_else (ne (reg/v:SI 109 [ i ])
                (reg:SI 130))
            (label_ref:SI 116)
            (pc))) -1 (nil)
    (expr_list:REG_EQUAL (if_then_else (ne (reg/v:SI 109 [ i ])
                (const_int 64 [0x40]))
            (label_ref:SI 116)
            (pc))
        (expr_list:REG_BR_PROB (const_int 9844 [0x2674])
            (nil))))
;; End of basic block 7, registers live:
 (nil)

;; Start of basic block 13, registers live: (nil)
(code_label 116 69 115 13 55 "" [1 uses])

(note 115 116 71 13 [bb 13] NOTE_INSN_BASIC_BLOCK)
;; End of basic block 13, registers live:
 (nil)

;; Start of basic block 8, registers live: (nil)
(note 71 115 73 8 [bb 8] NOTE_INSN_BASIC_BLOCK)

(insn 73 71 74 8 (set (reg:DI 25 %r25 [ D.1497 ])
        (reg:DI 110 [ D.1497 ])) 77 {*pa.md:4458} (nil)
    (insn_list:REG_LIBCALL 75 (nil)))

(call_insn/u 74 73 75 8 (parallel [
            (set (reg:SI 28 %r28)
                (call (mem:SI (symbol_ref/v:SI ("@__paritydi2") [flags 0x41]) [
0 S4 A32])
                    (const_int 64 [0x40])))
            (clobber (reg:SI 1 %r1))
            (clobber (reg:SI 2 %r2))
            (use (const_int 0 [0x0]))
        ]) 210 {call_val_symref} (nil)
    (expr_list:REG_EH_REGION (const_int -1 [0xffffffff])
        (nil))
    (expr_list:REG_DEP_TRUE (use (reg:DI 25 %r25 [ D.1497 ]))
        (nil)))
As a result, jump_insn 69 no longer does anything.  All references
to code_label 27 are now gone and this appears to allow stuff that
was originally in the loop to end up as a loop initializers.





-- 


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

Reply via email to