public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/61757] [4.10 Regression] genmodes failure with enable-checking Date: Mon, 14 Jul 2014 09:48:00 -0000 [thread overview] Message-ID: <bug-61757-4-orrHcLt0kN@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-61757-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61757 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |law at gcc dot gnu.org --- Comment #26 from Richard Biener <rguenth at gcc dot gnu.org> --- DOM first rotates the loop by threading the entry over the first part of the conditional, producing if (i + 1 < n && q == a[i + 1].p) { ++i; do { if (q != a[i].p) break; ++i; if (i >= n) break; } while (1); the 2nd DOM pass then tries to complete the rotate but manages to record two threadings that are incompatible: Threaded jump 6 --> 12 to 13 Jump threading proved probability of edge 12->4 too small (it is 5114, should be 10000). Threaded jump 7 --> 12 to 14 the 2nd one over the loop entry would be ok, completing the rotate. But the first one is odd - and I can't see why we register it: Optimizing block #6 1>>> COND 1 = n_4(D) ge_expr i_12 1>>> COND 1 = n_4(D) ne_expr i_12 1>>> COND 1 = n_4(D) gt_expr i_12 1>>> COND 0 = n_4(D) le_expr i_12 Optimizing statement pretmp_11 = a[i_12].p; LKUP STMT pretmp_11 = a[i_12].p pretmp_11 = a[i_12].p; 2>>> STMT pretmp_11 = a[i_12].p pretmp_11 = a[i_12].p; Registering jump thread: (6, 12) incoming edge; (12, 4) normal; <<<< STMT pretmp_11 = a[i_12].p pretmp_11 = a[i_12].p; <<<< COND 0 = n_4(D) le_expr i_12 <<<< COND 1 = n_4(D) gt_expr i_12 <<<< COND 1 = n_4(D) ne_expr i_12 <<<< COND 1 = n_4(D) ge_expr i_12 bb6 is just <bb 6>: pretmp_11 = a[i_12].p; and its single predecessor <bb 4>: i_12 = i_9 + 1; if (n_4(D) > i_12) goto <bb 6>; else goto <bb 5>; with the record_equality change we now record q_8(D) == prephitmp_16 instead of the other way around: Optimizing block #4 0>>> COPY q_8(D) = prephitmp_16 1>>> COND 1 = q_8(D) le_expr prephitmp_16 1>>> COND 1 = q_8(D) ge_expr prephitmp_16 1>>> COND 1 = q_8(D) eq_expr prephitmp_16 1>>> COND 0 = q_8(D) ne_expr prephitmp_16 but when threading over the backedge this doesn't get invalidated. So this canonicalization happens to be a correctness issue (by accident? Jeff?)
next prev parent reply other threads:[~2014-07-14 9:48 UTC|newest] Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-07-09 7:51 [Bug bootstrap/61757] New: " dcb314 at hotmail dot com 2014-07-09 8:56 ` [Bug bootstrap/61757] " dominiq at lps dot ens.fr 2014-07-09 10:14 ` ktkachov at gcc dot gnu.org 2014-07-09 11:56 ` [Bug bootstrap/61757] [4.10 Regression] " rguenth at gcc dot gnu.org 2014-07-09 12:45 ` [Bug tree-optimization/61757] " schwab@linux-m68k.org 2014-07-09 13:09 ` schwab@linux-m68k.org 2014-07-09 20:47 ` dominiq at lps dot ens.fr 2014-07-10 9:36 ` rguenth at gcc dot gnu.org 2014-07-10 9:39 ` ktkachov at gcc dot gnu.org 2014-07-10 10:29 ` schwab@linux-m68k.org 2014-07-10 14:43 ` rguenth at gcc dot gnu.org 2014-07-10 14:49 ` rguenth at gcc dot gnu.org 2014-07-11 13:29 ` rguenth at gcc dot gnu.org 2014-07-11 13:45 ` dominiq at lps dot ens.fr 2014-07-11 14:07 ` ro at gcc dot gnu.org 2014-07-11 14:26 ` schwab@linux-m68k.org 2014-07-11 16:16 ` pthaugen at gcc dot gnu.org 2014-07-11 17:24 ` matz at gcc dot gnu.org 2014-07-11 17:47 ` matz at gcc dot gnu.org 2014-07-11 18:32 ` schwab@linux-m68k.org 2014-07-11 23:03 ` pthaugen at gcc dot gnu.org 2014-07-13 13:39 ` dominiq at lps dot ens.fr 2014-07-13 17:32 ` segher at gcc dot gnu.org 2014-07-14 1:23 ` danglin at gcc dot gnu.org 2014-07-14 8:56 ` rguenth at gcc dot gnu.org 2014-07-14 9:04 ` rguenth at gcc dot gnu.org 2014-07-14 9:17 ` rguenth at gcc dot gnu.org 2014-07-14 9:48 ` rguenth at gcc dot gnu.org [this message] 2014-07-14 10:51 ` rguenth at gcc dot gnu.org 2014-07-14 10:51 ` rguenth at gcc dot gnu.org 2014-07-14 17:57 ` pthaugen at gcc dot gnu.org 2014-07-14 19:15 ` law at redhat dot com 2014-07-15 7:45 ` rguenther at suse dot de 2015-01-16 5:37 ` law at redhat dot com
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-61757-4-orrHcLt0kN@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).