This is the mail archive of the gcc-bugs@gcc.gnu.org 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]

[Bug rtl-optimization/20756] New: Clobbers of deleted insns are processed, but left out


consider these insns from compile/951116-1.c:

(note:HI 2 0 6 NOTE_INSN_DELETED)

(note:HI 6 2 9 NOTE_INSN_FUNCTION_BEG)

(note:HI 9 6 41 0 [bb 0] NOTE_INSN_BASIC_BLOCK)

(insn/f 41 9 42 0 (set (mem:SI (pre_dec:SI (reg/f:SI 15 r15)) [0 S4 A32])
        (reg/f:SI 14 r14)) -1 (nil)
    (expr_list:REG_INC (reg/f:SI 15 r15)
        (nil)))

(insn/f 42 41 43 0 (set (reg/f:SI 14 r14)
        (reg/f:SI 15 r15)) -1 (nil)
    (nil))

(note 43 42 11 0 NOTE_INSN_PROLOGUE_END)

(note:HI 11 43 13 0 NOTE_INSN_DELETED)

(note:HI 13 11 21 0 NOTE_INSN_DELETED)

(note:HI 21 13 36 0 NOTE_INSN_FUNCTION_END)

(note 36 21 12 0 NOTE_INSN_DELETED)

(insn:HI 12 36 14 0 (parallel [
            (set (reg:SI 147 t)
                (lt:SI (reg:SI 0 r0)
                    (const_int 0 [0x0])))
            (clobber (reg:SI 0 r0))
        ]) 114 {*ashlsi_c_void} (nil)
    (nil))

(insn:HI 14 12 30 0 (set (reg:SI 1 r1 [ SR.4+4 ])
        (neg:SI (reg:SI 147 t))) 45 {mov_neg_si_t} (insn_list:REG_DEP_ANTI 10 (nil))
    (nil))

(insn 30 14 47 0 (use (reg/i:SI 0 r0 [ <result> ])) -1 (insn_list:REG_DEP_TRUE
24 (nil))
    (nil))

(note 47 30 48 0 NOTE_INSN_EPILOGUE_BEG)

(insn 48 47 49 0 (unspec_volatile [
            (const_int 0 [0x0])
        ] 0) -1 (nil)
    (nil))

(insn 49 48 50 0 (set (reg/f:SI 15 r15)
        (reg/f:SI 14 r14)) -1 (nil)
    (nil))

(insn 50 49 51 0 (set (reg/f:SI 14 r14)
        (mem:SI (post_inc:SI (reg/f:SI 15 r15)) [0 S4 A32])) -1 (nil)
    (expr_list:REG_INC (reg/f:SI 15 r15)
        (nil)))

(jump_insn 51 50 52 0 (return) -1 (nil)
    (nil))

(barrier 52 51 39)

(note 39 52 40 0 NOTE_INSN_DELETED)

(note 40 39 0 NOTE_INSN_DELETED)

propagate_block deletes insn 14 and 12.

Because of the mark_set_regs call instroduced here:
http://gcc.gnu.org/ml/gcc-patches/2000-05/msg00003.html ,
the set / clobber of T and r0 are still processed, and thus
r0 is considered dead at the start of the block.
The next time propagate_block processes this block, however,
r0 is seen as live because of insn 30, and we panic because
a register has become live.
I think that when we have a set or clobber of a dead insn that
clobbers a live register, we need to insert a clobber to show that
this register is dead.

-- 
           Summary: Clobbers of deleted insns are processed, but left out
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P2
         Component: rtl-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: amylaar at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


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