public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: Richard Earnshaw <rearnsha@arm.com>
To: nobody@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org,
Subject: Re: target/5170: Supicious code in arm.md
Date: Fri, 04 Jan 2002 09:46:00 -0000	[thread overview]
Message-ID: <20020104174602.18327.qmail@sources.redhat.com> (raw)

The following reply was made to PR target/5170; it has been noted by GNATS.

From: Richard Earnshaw <rearnsha@arm.com>
To: Klaus.k.pedersen@nokia.com
Cc: gcc-gnats@gcc.gnu.org, Richard.Earnshaw@arm.com
Subject: Re: target/5170: Supicious code in arm.md 
Date: Fri, 04 Jan 2002 17:41:38 +0000

  
 > I think that there is a bug here:
 >  
 > >     for (i = 0; i < 25; i++)
 > >       if ((val & (mask << i)) == val)
 > >         break;
 > > 
 > >     if (i == 0)
 > >       FAIL;
 
 The test is correct.  We don't want to use the split pattern if we can 
 handle the constant with a single instruction.  That could lead to a 
 recursive split of the instruction.
 
 That is, the pattern is looking for cases of 
 
 	mov	Rn, #const
 
 that are invalid, but can be represented as
 
 	mov	Rn, #(const >> i)
 	lsr	Rn, #i
 
 Clearly we don't want to do this when i == 0, since a shift of zero is a 
 no-op (and recursive attempts to split the initial mov instruction would 
 never terminate).
 
 There is no need to test for i == 25, since the predicate for the pattern 
 has already told us that the constant is OK.
 
 
 


             reply	other threads:[~2002-01-04 17:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-04  9:46 Richard Earnshaw [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-03-15  9:18 rearnsha
2002-01-24  2:30 rearnsha
2002-01-23 11:16 Klaus Pedersen
2002-01-22  3:04 pb
2002-01-04  9:46 Richard Earnshaw
2001-12-21  6:56 Klaus.k.pedersen

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=20020104174602.18327.qmail@sources.redhat.com \
    --to=rearnsha@arm.com \
    --cc=gcc-prs@gcc.gnu.org \
    --cc=nobody@gcc.gnu.org \
    /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).