Hi,

I'm trying to make some peephole2 optimizations working (gcc 4.6.1), but
it seems the REG_DEAD information is lost during or after reload.

In the following peephole2 definition, peep2_reg_dead_p returns false,
whereas REG_DEAD information is correctly set before reload for
operands[0] on the second insn:

(define_peephole2
   [(set (match_operand:SI 0 "nonimmediate_operand" "")
         (sign_extend:SI (match_operand:HI 1 "general_operand" "")))
    (set (match_operand:PSI 2 "nonimmediate_operand" "")
         (truncate:PSI (match_dup 0)))]
    "peep2_reg_dead_p(2, operands[0])"
   [(set (match_dup 2) (sign_extend:PSI (match_dup 1)))]
   "")

What do I miss?


Thanks,
Aurélien

Reply via email to