public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "steven at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/23286] missed fully redundant expression Date: Sun, 23 Nov 2008 13:12:00 -0000 [thread overview] Message-ID: <20081123131112.8898.qmail@sourceware.org> (raw) In-Reply-To: <bug-23286-7849@http.gcc.gnu.org/bugzilla/> ------- Comment #17 from steven at gcc dot gnu dot org 2008-11-23 13:11 ------- For the test case of comment #0, the proof-of-concept patch does the following in the .084t.pre dump (relevant excerpts only): VBEOUT[2] := { {lshift_expr,a_2(D),1} (0004) } Inserting expression 5 into AVAIL_OUT[2] Inserted pretmp.12_8 = a_2(D) << 1; in predecessor 2 AVAIL_OUT[2] := { a_2(D) (0002), a.0_3 (0003), pretmp.12_8 (0004) } Successor 1 not dominated by 5 -> empty set VBEOUT[5] := { } AVAIL_OUT[5] := { a_2(D) (0002), a.0_3 (0003), a_1 (0001), pretmp.12_8 (0004) } Successor 5 not dominated by 4 -> empty set VBEOUT[4] := { } AVAIL_OUT[4] := { a_2(D) (0002), a.0_3 (0003), pretmp.12_8 (0004) } Successor 5 not dominated by 3 -> empty set VBEOUT[3] := { } AVAIL_OUT[3] := { a_2(D) (0002), a.0_3 (0003), a_5 (0005), pretmp.12_8 (0004) } Replaced a_2(D) << 1 with pretmp.12_8 in a_4 = a_2(D) << 1; Replaced a_2(D) << 1 with pretmp.12_8 in a_6 = a_2(D) << 1; ... f (short unsigned int a) { short unsigned int pretmp.12; short int a.0; <bb 2>: a.0_3 = (short int) a_2(D); pretmp.12_8 = a_2(D) << 1; if (a.0_3 < 0) goto <bb 3>; else goto <bb 4>; <bb 3>: a_4 = pretmp.12_8; a_5 = a_4 ^ 4129; goto <bb 5>; <bb 4>: a_6 = pretmp.12_8; <bb 5>: # a_1 = PHI <a_5(3), a_6(4)> return a_1; } which eventually leads to the following in the .126t.final_cleanup dump: ;; Function f (f) f (short unsigned int a) { short unsigned int a.22; <bb 2>: a.22 = a << 1; if ((short int) a < 0) goto <bb 3>; else goto <bb 4>; <bb 3>: a.22 = a.22 ^ 4129; <bb 4>: return a.22; } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23286
next prev parent reply other threads:[~2008-11-23 13:12 UTC|newest] Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-23286-7849@http.gcc.gnu.org/bugzilla/> 2005-10-28 18:43 ` pinskia at gcc dot gnu dot org 2007-10-10 22:59 ` steven at gcc dot gnu dot org 2007-10-16 13:33 ` steven at gcc dot gnu dot org 2007-10-26 4:09 ` astrange at ithinksw dot com 2008-02-23 5:23 ` pinskia at gcc dot gnu dot org 2008-11-21 6:43 ` steven at gcc dot gnu dot org 2008-11-23 13:09 ` steven at gcc dot gnu dot org 2008-11-23 13:12 ` steven at gcc dot gnu dot org [this message] 2008-11-23 13:24 ` steven at gcc dot gnu dot org 2008-11-23 13:33 ` rguenth at gcc dot gnu dot org 2008-11-23 13:45 ` rguenth at gcc dot gnu dot org 2008-11-23 14:22 ` steven at gcc dot gnu dot org 2008-11-23 18:31 ` dberlin at dberlin dot org 2008-11-27 15:27 ` steven at gcc dot gnu dot org 2008-12-01 22:02 ` steven at gcc dot gnu dot org 2009-08-04 9:06 ` steven at gcc dot gnu dot org 2010-01-17 12:34 ` rguenth at gcc dot gnu dot org 2010-01-17 12:35 ` rguenth at gcc dot gnu dot org 2010-01-17 12:56 ` rguenth at gcc dot gnu dot org 2010-01-17 13:00 ` steven at gcc dot gnu dot org 2010-02-24 9:40 ` steven at gcc dot gnu dot org [not found] <bug-23286-4@http.gcc.gnu.org/bugzilla/> 2010-11-16 14:45 ` rguenth at gcc dot gnu.org 2011-07-20 0:41 ` pinskia at gcc dot gnu.org 2011-07-29 20:15 ` pinskia at gcc dot gnu.org 2012-02-15 11:23 ` rguenth at gcc dot gnu.org 2012-02-15 16:07 ` rguenth at gcc dot gnu.org 2012-02-15 18:42 ` steven at gcc dot gnu.org 2012-02-16 9:48 ` rguenther at suse dot de 2012-02-16 12:58 ` rguenth at gcc dot gnu.org 2012-02-20 12:13 ` rguenth at gcc dot gnu.org 2012-02-23 14:00 ` aldot at gcc dot gnu.org 2005-08-08 17:46 [Bug tree-optimization/23286] New: " bonzini at gcc dot gnu dot org 2005-08-08 17:46 ` [Bug tree-optimization/23286] " bonzini at gcc dot gnu dot org 2005-08-08 18:42 ` pinskia at gcc dot gnu dot org 2005-08-08 18:53 ` dberlin at gcc dot gnu dot org 2005-08-08 18:56 ` dberlin at gcc dot gnu dot org 2005-08-08 19:34 ` pinskia at gcc dot gnu dot org 2005-08-08 19:36 ` pinskia at gcc dot gnu dot org 2005-08-08 19:54 ` pinskia at gcc dot gnu dot org 2005-08-08 20:29 ` dberlin at dberlin dot org 2005-08-08 20:40 ` dberlin at dberlin dot org 2005-08-29 12:35 ` pinskia 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=20081123131112.8898.qmail@sourceware.org \ --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).