public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ian Lance Taylor <iant@google.com>
To: He Xiao <xiheasas@gmail.com>
Cc: gcc-help@gcc.gnu.org
Subject: Re: A very odd phenomenon when does -O1
Date: Fri, 05 Mar 2010 15:54:00 -0000	[thread overview]
Message-ID: <mcrpr3ig3xs.fsf@dhcp-172-17-9-151.mtv.corp.google.com> (raw)
In-Reply-To: <910910031003040619uc54c06fua0f6936ae99420a7@mail.gmail.com> (He Xiao's message of "Thu\, 4 Mar 2010 22\:19\:34 +0800")

He Xiao <xiheasas@gmail.com> writes:

> after GREG, the insn becomes
>
> (insn 91 40 45 5 (set (reg:SI 27 r27 [orig:54+-2 ] [54])
>        (high:SI (const_int 24930 [0x6162]))) 4 {arch_movsi} (nil)
>    (nil)
>
> which matches "arch_movsi" pattern, and thus 0x6162 is not qualified
> for arch_move_operand, the final output is as follow:

Why does this match arch_movsi?  arch_movsi does not have HIGH in the
pattern.  Does your arch_move_operand predicate accept HIGH?  If so,
why?

Note that there are a number of examples of backends with similar
restrictions.  E.g., mips.  They usually do not use HIGH with
CONST_INT; they use HIGH with SYMBOL_REF.  For CONST_INT they split up
the value in the movsi define_expand, and then use predicates to
prevent the real insns from matching anything which the architecture
does not support.

Ian

      reply	other threads:[~2010-03-05 15:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-04 14:19 He Xiao
2010-03-05 15:54 ` Ian Lance Taylor [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=mcrpr3ig3xs.fsf@dhcp-172-17-9-151.mtv.corp.google.com \
    --to=iant@google.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=xiheasas@gmail.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).