This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFA][PATCH][PR middle-end/59743] Fix ree improvement when defining insn is after use insn
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 10 Jan 2014 23:03:08 +0100
- Subject: Re: [RFA][PATCH][PR middle-end/59743] Fix ree improvement when defining insn is after use insn
- Authentication-results: sourceware.org; auth=none
- References: <52D06D23 dot 3010004 at redhat dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Jan 10, 2014 at 02:58:59PM -0700, Jeff Law wrote:
> +2014-01-10 Jeff Law <law@redhat.com>
> +
> + PR middle-end/59743
> + * ree.c (combine_reaching_defs): Ensure the defining statement
> + occurs before the extension when optimizing extensions with
> + different source and destination hard registers.
> --- /dev/null
> +++ b/gcc/testsuite/gcc.c-torture/compile/pr59743.c
> @@ -0,0 +1,22 @@
Please add a
/* PR middle-end/59743 */
comment here.
Ok with that change, thanks.
> +
> +typedef union {
> + long all;
> + struct {
> + int low;
> + int high;
> + } s;
> +} udwords;
> +int a, b, c, d;
> +void __udivmoddi4() {
> + udwords r;
> + d = __builtin_clz(0);
> + r.s.low = 0;
> + for (; d; --d) {
> + r.s.high = r.s.high << 1 | r.s.low >> a;
> + r.s.low = r.s.low << b >> 1;
> + int s = -r.all;
> + c = s;
> + r.all--;
> + }
> +}
> +
Jakub