This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: peephole2 question
- From: Peter Barada <pbarada at mail dot wm dot sps dot mot dot com>
- To: gcc at gcc dot gnu dot org
- Date: Tue, 23 Apr 2002 18:10:43 -0400
- Subject: Re: peephole2 question
I've got a peephole2 that uses match_operator to select both PLUS and
MULT. How to I specify in the new-insn-pattern the result of the
match_operator? In the following, what do I put in place of 'xxx'
that means the operator that I think is in operands[3]:
(define_peephole2
[(set (match_operand:DF 0 "m68k_freg_operand" "")
(mem:DF (match_operand:SI 1 "m68k_areg_operand" "")))
(set (match_operand:DF 2 "m68k_freg_operand" "")
(match_operator:DF 3 "plus_or_mult_operator"
[(match_dup 2)
(match_dup 0)]))]
"0 && TARGET_CFV4E
&& peep2_reg_dead_p (2, operands[0])
&& REGNO (operands[0]) != REGNO (operands[2])"
[(set (match_dup 2)
(xxx:DF (match_dup 2)
(mem:DF (match_dup 1))))]
"")
I know that I could create more patterns, one for each type, but that
makes the recognizer bigger.
Any ideas?
--
Peter Barada Peter.Barada@motorola.com
Wizard 781-852-2768 (direct)
WaveMark Solutions(wholly owned by Motorola) 781-270-0193 (fax)