public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "hubicka at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/45522] New: VRP misses oppurtunity for statement folding. Date: Fri, 03 Sep 2010 15:58:00 -0000 [thread overview] Message-ID: <bug-45522-176@http.gcc.gnu.org/bugzilla/> (raw) Hi, compiling the attached testcase (reduced from tree.c) with -O2 leads to vrp folding: if (D.2762_2 == 6) goto <bb 3>; else goto <bb 9>; <bb 3>: D.2766_5 = (int) D.2762_2; D.2767_6 = tree_code_type[D.2766_5]; into D.2762_2 = type_1(D)->base.code; if (D.2762_2 == 6) goto <bb 3>; else goto <bb 9>; <bb 3>: D.2766_5 = 6; D.2767_6 = tree_code_type[6]; this is good transform, however tree_code_type is constant initialized array and we miss possibility to fold it into constant until expansion triggering code in expr.c I would like to retire. We can fold tree_code_type[6], so apparently just no one calls fold_gimple_stmt on it? -- Summary: VRP misses oppurtunity for statement folding. Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: hubicka at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45522
next reply other threads:[~2010-09-03 15:58 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-09-03 15:58 hubicka at gcc dot gnu dot org [this message] 2010-09-03 15:59 ` [Bug tree-optimization/45522] " hubicka at gcc dot gnu dot org 2010-09-03 16:33 ` hubicka at gcc dot gnu dot org 2010-09-03 16:34 ` hubicka at gcc dot gnu dot org 2010-09-03 20:05 ` hubicka at gcc dot gnu dot org 2010-09-03 20:10 ` hubicka at gcc dot gnu dot org 2010-09-03 20:13 ` hubicka at gcc dot gnu dot org 2010-09-03 20:29 ` hubicka at gcc dot gnu dot org 2010-09-04 8:29 ` rguenther at suse dot de 2010-09-04 13:52 ` hubicka at gcc dot gnu dot org 2010-09-04 14:11 ` rguenther at suse dot de 2010-09-04 18:01 ` hubicka at gcc dot gnu dot 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-45522-176@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).