From: Alan Lehotsky <apl@alum.mit.edu>
To: Peter Barada <pbarada@mail.wm.sps.mot.com>
Cc: gcc@gcc.gnu.org
Subject: Re: peephole2 question
Date: Tue, 23 Apr 2002 16:05:00 -0000 [thread overview]
Message-ID: <a05111700b8eb936d228e@[63.214.117.144]> (raw)
In-Reply-To: <200204232210.g3NMAhM30480@hyper.wm.sps.mot.com>
You use a "match_dup" in the peephole result and an action statement that
does something like
(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)
(match_dup 3)
)]
"
operands[3] = gen_rtx (..... operands[2], operands[1])
")
You might want to make your "plus_or_mult_operator()" function leave the
right code somewhere global so that you don't have to grovel thru the pattern
to find if it's PLUS or MULT....
At 6:10 PM -0400 4/23/02, Peter Barada wrote:
>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]:
>
--
Quality Software Management
http://home.earthlink.net/~qsmgmt
apl@alum.mit.edu
(978)287-0435 Voice
(978)808-6836 Cell
Software Process Improvement / Management Consulting
Language Design / Compiler Implementation
prev parent reply other threads:[~2002-04-23 22:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-23 15:36 Peter Barada
2002-04-23 15:48 ` Richard Henderson
2002-04-23 16:05 ` Alan Lehotsky [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='a05111700b8eb936d228e@[63.214.117.144]' \
--to=apl@alum.mit.edu \
--cc=gcc@gcc.gnu.org \
--cc=pbarada@mail.wm.sps.mot.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).