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

peephole2+dead reg info after reload?


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


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