public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "glisse at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/55611] Operand swapping for commutative operators Date: Mon, 11 Mar 2013 14:44:00 -0000 [thread overview] Message-ID: <bug-55611-4-Q9DGhGDVKR@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-55611-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55611 --- Comment #2 from Marc Glisse <glisse at gcc dot gnu.org> 2013-03-11 14:44:09 UTC --- The fortran test that fails is equivalent to the following (use -Ofast -g, surprisingly it only fails in var tracking) float f(double*a,double*b){ double x=a[0]*b[0]; x+=a[1]*b[1]; x+=a[2]*b[2]; x+=a[3]*b[3]; return x; } This happens because of an infinite loop between simplify_associative_operation and simplify_gen_binary (and a few others) which keeps shuffling the additions around to try and canonicalize the expression. Some well placed tests whether GET_CODE(*)==code could probably help, although I am a bit surprised that it fails so seldom, and only in var-tracking. I didn't investigate the problem with the reverse order, as stage3 failures (in middle-end code) are hard to debug...
next prev parent reply other threads:[~2013-03-11 14:44 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-12-06 21:01 [Bug rtl-optimization/55611] New: " glisse at gcc dot gnu.org 2012-12-11 22:12 ` [Bug rtl-optimization/55611] " glisse at gcc dot gnu.org 2013-03-11 14:44 ` glisse at gcc dot gnu.org [this message] 2013-03-11 15:15 ` glisse at gcc dot gnu.org 2013-03-12 13:05 ` glisse at gcc dot gnu.org 2013-04-02 12:11 ` glisse at gcc dot gnu.org 2015-05-13 14:33 ` segher 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-55611-4-Q9DGhGDVKR@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: linkBe 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).