public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Earnshaw <rearnsha@arm.com>
To: Geoff Keating <geoffk@cygnus.com>
Cc: rearnsha@arm.com
Subject: Re: ssa bootstrap problem on x86 (cmpstrsi_1 pattern)
Date: Tue, 25 Jul 2000 03:20:00 -0000	[thread overview]
Message-ID: <200007251019.LAA23822@cam-mail2.cambridge.arm.com> (raw)
In-Reply-To: <200007241850.LAA01805@localhost.cygnus.com>

> >   I've looked at the SSA bootstrap problem.  It's caused by an insn
> >   in the x86 backend which looks like:
> > 
> > Thanks for tracking this down.
> > 
> >   (define_insn "cmpstrsi_1"
> >     [(set (reg:CC 17)
> > 	  (if_then_else:CC (ne (match_operand:SI 2 "register_operand" "c")
> > 			       (const_int 0))
> > 	    (compare:SI (mem:BLK (match_operand:SI 0 "address_operand" "S"))
> > 			(mem:BLK (match_operand:SI 1 "address_operand" "D")))
> > 	    (const_int 0)))
> >      (use (match_operand:SI 3 "immediate_operand" "i"))
> >      (use (reg:CC 17))
> >      (use (reg:SI 19))
> >      (clobber (match_dup 0))
> >      (clobber (match_dup 1))
> >      (clobber (match_dup 2))]
> >   ...)
> > 
> >   The problem here is the match_dups.  IMHO, it would be much better if
> >   these were written as match_scratch with '0', '1', and '2'
> >   constraints.
> > 

I've been talking over a similar problem on the ARM with RTH.  From my 
understanding, you cannot have a match_dup that ties an input to an output 
of the same insn if you want to be able to convert the insn to SSA form.  
You might be able to rewrite the above using ties: eg

   (define_insn "cmpstrsi_1"
     [(set (reg:CC 17)
 	  (if_then_else:CC (ne (match_operand:SI 5 "register_operand" "2")
 			       (const_int 0))
 	    (compare:SI (mem:BLK (match_operand:SI 3 "address_operand" "0"))
 			(mem:BLK (match_operand:SI 4 "address_operand" "1")))
 	    (const_int 0)))
      (use (match_operand:SI 3 "immediate_operand" "i"))
      (use (reg:CC 17))
      (use (reg:SI 19))
      (clobber (match_operand:SI 0 "address_operand" "+S"))
      (clobber (match_operand:SI 1 "address_operand" "+D"))
      (clobber (match_operand:SI 2 "register_operand" "+c"))]

Reload will then generate the necessary ties and reloads as required.

R.


  reply	other threads:[~2000-07-25  3:20 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-07-22 21:24 Geoff Keating
2000-07-23  0:50 ` Mark Mitchell
2000-07-24 11:51   ` Geoff Keating
2000-07-25  3:20     ` Richard Earnshaw [this message]
2000-07-26 22:55     ` Mark Mitchell
2000-07-27 12:50       ` Geoff Keating
2000-07-27 13:10         ` Mark Mitchell
2000-07-27 14:48           ` Richard Henderson
2000-07-27 15:13             ` Mark Mitchell
2000-07-27 15:14               ` Richard Henderson
2000-07-27 15:28                 ` Mark Mitchell
2000-07-27 15:35                   ` Richard Henderson
2000-07-27 15:42                     ` Mark Mitchell
2000-07-27 15:46               ` Geoff Keating
2000-07-27 15:44           ` Geoff Keating
2000-07-27 16:01             ` Mark Mitchell
2000-07-27 16:59               ` Joern Rennecke
2000-07-27 17:22                 ` Mark Mitchell
2000-07-27 17:57                   ` Michael Meissner
2000-07-27 18:31                     ` Mark Mitchell

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=200007251019.LAA23822@cam-mail2.cambridge.arm.com \
    --to=rearnsha@arm.com \
    --cc=geoffk@cygnus.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).