From: Richard Henderson <rth@redhat.com>
To: Jean Christophe Beyler <jean.christophe.beyler@gmail.com>
Cc: Ian Lance Taylor <iant@google.com>, gcc@gcc.gnu.org
Subject: Re: Bit fields
Date: Mon, 31 Aug 2009 21:53:00 -0000 [thread overview]
Message-ID: <4A9C345E.2030600@redhat.com> (raw)
In-Reply-To: <c568a2600908311307m3410d5d0va3571e9bbc90ca@mail.gmail.com>
On 08/31/2009 01:07 PM, Jean Christophe Beyler wrote:
> If I replace this :
> (define_insn "extzv"
> [(set (match_operand 0 "register_operand" "")
> (zero_extract (match_operand 1 "register_operand" "")
> (match_operand 2 "const_int_operand" "")
> (match_operand 3 "const_int_operand" "")))]
> ""
> "")
Well, I can tell you that an insn pattern with no modes
on the non-immediate operands will definitely cause problems.
> (insn 9 8 10 3 struct4.c:24 (set (subreg:DI (reg:QI 76) 0)
> (zero_extract:DI (reg:DI 75)
> (const_int 1 [0x1])
> (const_int 0 [0x0]))) -1 (nil))
>
> (insn 10 9 11 3 struct4.c:24 (set (reg:DI 77)
> (zero_extend:DI (reg:QI 76))) -1 (nil))
>
> Is there anything I can do to remove that zero_extend?
You could try either using a predicate that disallows
a subreg, or by having your expander rewrite things into
(set (reg:DI new-scratch))
(zero_extract:DI ...))
(set (reg:QI 76 (subreg:QI (reg:DI new scratch)))
and relying on subsequent passes to clean that up.
r~
next prev parent reply other threads:[~2009-08-31 20:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-31 20:07 Jean Christophe Beyler
2009-08-31 20:36 ` Ian Lance Taylor
2009-08-31 21:27 ` Jean Christophe Beyler
2009-08-31 21:53 ` Richard Henderson [this message]
[not found] ` <c568a2600908311407i154c858eq9c5b085cafdc4d3b@mail.gmail.com>
[not found] ` <4A9C4029.2070205@redhat.com>
2009-09-01 2:20 ` Jean Christophe Beyler
2009-09-01 14:54 ` Richard Henderson
-- strict thread matches above, loose matches on Subject: below --
2000-12-07 3:33 Patch for 2.95.3 Gunther Nikl
2000-12-07 5:39 ` Bernd Schmidt
2000-12-07 6:58 ` Bit Fields Matt Minnis
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=4A9C345E.2030600@redhat.com \
--to=rth@redhat.com \
--cc=gcc@gcc.gnu.org \
--cc=iant@google.com \
--cc=jean.christophe.beyler@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).