From: Ian Lance Taylor <iant@google.com>
To: Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] lower-subreg: Decompose multiword shifts
Date: Tue, 07 Aug 2007 01:27:00 -0000 [thread overview]
Message-ID: <m3k5s8p226.fsf@localhost.localdomain> (raw)
In-Reply-To: <20070802153434.GA24953@blc4eb430604175.ibm.com>
Andreas Krebbel <Andreas.Krebbel@de.ibm.com> writes:
> 2007-08-02 Andreas Krebbel <krebbel1@de.ibm.com>
>
> * lower-subreg.c (resolve_subreg_use): Remove assertion.
> (find_decomposable_shift, resolve_multiword_shift): New functions.
> (decompose_multiword_subregs): Use the functions above to decompose
> multiword shifts.
>
>
> 2007-08-02 Andreas Krebbel <krebbel1@de.ibm.com>
>
> * gcc.dg/multiword-shifts.c: New testcase.
> + /* Decompose the word wide shift (in INSN) of a multiword pseudo into
> + if (resolve_reg_p (SET_DEST (set)))
> + {
> + gcc_assert (GET_CODE (SET_DEST (set)) == CONCATN);
> +
> + dest_reg = XVECEXP (SET_DEST (set), 0, 1 - src_reg_num);
> + dest_zero = XVECEXP (SET_DEST (set), 0, src_reg_num);
> + }
> + else
> + {
> + dest_reg = gen_rtx_SUBREG (word_mode, SET_DEST (set), offset1);
> + dest_zero = gen_rtx_SUBREG (word_mode, SET_DEST (set), offset2);
> + }
> +
> + if (resolve_reg_p (shift_operand))
> + {
> + gcc_assert (GET_CODE (shift_operand) == CONCATN);
> +
> + src_reg = XVECEXP (shift_operand, 0, src_reg_num);
> + }
> + else
> + src_reg = gen_rtx_SUBREG (word_mode, shift_operand, offset2);
I think this should just be
dest_reg = simplify_gen_subreg_concatn (word_mode, SET_DEST (set),
GET_MODE (SET_DEST (dest)),
offset1);
dest_zero = simplify_gen_subreg_concatn (word_mode, SET_DEST (set),
GET_MODE (SET_DEST (dest)),
offset2);
src_reg = simplify_gen_subreg_concatn (word_mode, shift_operand,
GET_MODE (shift_operand),
offset2);
The patch is OK with that change, assuming it still passes bootstrap
and testsuite.
Thanks.
Ian
next prev parent reply other threads:[~2007-08-07 1:27 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-02 15:35 Andreas Krebbel
2007-08-02 16:56 ` Paolo Bonzini
2007-08-03 16:41 ` Andreas Krebbel
2007-08-03 19:02 ` Paolo Bonzini
2007-08-02 18:52 ` Rask Ingemann Lambertsen
2007-08-02 19:21 ` Andreas Krebbel
2007-08-07 1:41 ` Rask Ingemann Lambertsen
2007-08-07 8:29 ` Andreas Krebbel
2007-08-02 23:16 ` Rask Ingemann Lambertsen
2007-08-03 12:03 ` Michael Matz
2007-08-03 14:34 ` Andreas Krebbel
2007-08-03 15:37 ` Michael Matz
2007-08-07 1:08 ` Ian Lance Taylor
2007-08-07 1:27 ` Ian Lance Taylor [this message]
2007-08-07 10:47 ` Andreas Krebbel
2007-08-08 18:40 ` Andreas Tobler
2007-08-09 7:45 ` Andreas Krebbel
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=m3k5s8p226.fsf@localhost.localdomain \
--to=iant@google.com \
--cc=Andreas.Krebbel@de.ibm.com \
--cc=gcc-patches@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).