This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
peephole2+dead reg info after reload?
- From: Aurelien Buhrig <aurelien dot buhrig dot gcc at gmail dot com>
- To: gcc at gcc dot gnu dot org
- Date: Tue, 13 Mar 2012 11:33:53 +0100
- Subject: 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