public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ebotcazou at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/49472] [4.7 regression] Compiler segfault on valid code
Date: Tue, 21 Jun 2011 08:33:00 -0000 [thread overview]
Message-ID: <bug-49472-4-EHRPpBeuaA@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-49472-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49472
--- Comment #10 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2011-06-21 08:31:22 UTC ---
> --- gcc/simplify-rtx.c.jj 2011-06-08 08:53:15.000000000 +0200
> +++ gcc/simplify-rtx.c 2011-06-21 09:46:27.000000000 +0200
> @@ -686,13 +686,13 @@ simplify_unary_operation_1 (enum rtx_cod
> return simplify_gen_binary (MINUS, mode, temp, XEXP (op, 1));
> }
>
> - /* (neg (mult A B)) becomes (mult (neg A) B).
> + /* (neg (mult A B)) becomes (mult A (neg B)).
> This works even for floating-point values. */
> if (GET_CODE (op) == MULT
> && !HONOR_SIGN_DEPENDENT_ROUNDING (mode))
> {
> - temp = simplify_gen_unary (NEG, mode, XEXP (op, 0), mode);
> - return simplify_gen_binary (MULT, mode, temp, XEXP (op, 1));
> + temp = simplify_gen_unary (NEG, mode, XEXP (op, 1), mode);
> + return simplify_gen_binary (MULT, mode, XEXP (op, 0), temp);
> }
>
> /* NEG commutes with ASHIFT since it is multiplication. Only do
>
> stops the moving of the operands around, with this it keeps being called with
> the same operands again and again, but still an endless recursion. Eric, any
> preferences where to prevent this from happening?
ISTM that pursuing in the above way, according to swap_commutative_operands_p,
is a sensible approach, so I'd remove the simplify_binary_operation_1 bits.
next prev parent reply other threads:[~2011-06-21 8:33 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-20 11:05 [Bug fortran/49472] New: [gfortran, 4.7 " martin@mpa-garching.mpg.de
2011-06-20 11:31 ` [Bug fortran/49472] " dominiq at lps dot ens.fr
2011-06-20 11:55 ` [Bug rtl-optimization/49472] [4.7 " rguenth at gcc dot gnu.org
2011-06-20 12:13 ` janus at gcc dot gnu.org
2011-06-20 14:13 ` dominiq at lps dot ens.fr
2011-06-20 14:18 ` dominiq at lps dot ens.fr
2011-06-20 15:18 ` wschmidt at gcc dot gnu.org
2011-06-20 15:19 ` wschmidt at gcc dot gnu.org
2011-06-20 16:09 ` jakub at gcc dot gnu.org
2011-06-21 7:52 ` jakub at gcc dot gnu.org
2011-06-21 8:33 ` ebotcazou at gcc dot gnu.org [this message]
2011-07-04 10:28 ` jakub at gcc dot gnu.org
2011-07-04 18:54 ` jakub at gcc dot gnu.org
2011-07-04 18:57 ` jakub at gcc dot gnu.org
2011-07-04 21:12 ` jakub at gcc dot gnu.org
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=bug-49472-4-EHRPpBeuaA@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@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).