public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenther at suse dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/56049] [4.8 Regression] Simplification to constants not done
Date: Tue, 12 Feb 2013 11:07:00 -0000	[thread overview]
Message-ID: <bug-56049-4-Dns7RHC7RV@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-56049-4@http.gcc.gnu.org/bugzilla/>


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56049

--- Comment #6 from rguenther at suse dot de <rguenther at suse dot de> 2013-02-12 11:06:23 UTC ---
On Mon, 11 Feb 2013, hubicka at gcc dot gnu.org wrote:

> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56049
> 
> --- Comment #5 from Jan Hubicka <hubicka at gcc dot gnu.org> 2013-02-11 22:55:44 UTC ---
> Well, I think we should try to toamn fantasy of our optimizers here.  What
> unroller sees at -O3 -fno-tree-vectorize is quite ugly:
> 
>   <bb 2>:
>   a = {};
> 
>   <bb 3>:
>   # i_1 = PHI <1(2), i_7(7)>
>   # prephitmp_99 = PHI <0(2), pretmp_98(7)>
>   # prephitmp_102 = PHI <0(2), pretmp_101(7)>
>   # prephitmp_105 = PHI <0(2), pretmp_104(7)>
>   # prephitmp_108 = PHI <0(2), pretmp_107(7)>
>   # prephitmp_111 = PHI <0(2), pretmp_110(7)>
>   # prephitmp_114 = PHI <0(2), pretmp_113(7)>
>   # prephitmp_117 = PHI <0(2), pretmp_116(7)>
>   # prephitmp_120 = PHI <0(2), pretmp_119(7)>
>   # ivtmp_57 = PHI <10000000(2), ivtmp_64(7)>
> 
>   <bb 4>:
>   # S.0_90 = PHI <S.0_36(5), 1(3)>
>   # prephitmp_126 = PHI <pretmp_125(5), prephitmp_99(3)>
>   # prephitmp_129 = PHI <pretmp_128(5), prephitmp_102(3)>
>   # prephitmp_132 = PHI <pretmp_131(5), prephitmp_105(3)>
>   # prephitmp_135 = PHI <pretmp_134(5), prephitmp_108(3)>
>   # prephitmp_138 = PHI <pretmp_137(5), prephitmp_111(3)>
>   # prephitmp_141 = PHI <pretmp_140(5), prephitmp_114(3)>
>   # prephitmp_144 = PHI <pretmp_143(5), prephitmp_117(3)>
>   # prephitmp_147 = PHI <pretmp_146(5), prephitmp_120(3)>
>   # ivtmp_43 = PHI <ivtmp_50(5), 8(3)>
>   _29 = S.0_90 * 8;
>   _42 = _29 + -8;
>   _44 = prephitmp_126 + 1;
>   b[_42] = _44;
>   _49 = _29 + -7;
>   _51 = prephitmp_129 + 1;
>   b[_49] = _51;
>   _56 = _29 + -6;
>   _58 = prephitmp_132 + 1;
>   b[_56] = _58;
>   _63 = _29 + -5;
>   _65 = prephitmp_135 + 1;
>   b[_63] = _65;
>   _70 = _29 + -4;
>   b[_63] = _65;
>   _70 = _29 + -4;
>   _72 = prephitmp_138 + 1;
>   b[_70] = _72;
>   _77 = _29 + -3;
>   _79 = prephitmp_141 + 1;
>   b[_77] = _79;
>   _84 = _29 + -2;
>   _86 = prephitmp_144 + 1;
>   b[_84] = _86;
>   _91 = _29 + -1;
>   _93 = prephitmp_147 + 1;
>   b[_91] = _93;
>   S.0_36 = S.0_90 + 1;
>   ivtmp_50 = ivtmp_43 - 1;
>   if (ivtmp_50 == 0)
>     goto <bb 6>;
>   else
>     goto <bb 5>;
> 
>   <bb 5>:
>   pretmp_122 = S.0_36 * 8;
>   pretmp_124 = pretmp_122 + -8;
>   pretmp_125 = a[pretmp_124];
>   pretmp_127 = pretmp_122 + -7;
>   pretmp_128 = a[pretmp_127];
>   pretmp_130 = pretmp_122 + -6;
>   pretmp_131 = a[pretmp_130];
>   pretmp_133 = pretmp_122 + -5;
>   pretmp_134 = a[pretmp_133];
>   pretmp_136 = pretmp_122 + -4;
>   pretmp_137 = a[pretmp_136];
>   pretmp_139 = pretmp_122 + -3;
>   pretmp_140 = a[pretmp_139];
>   pretmp_142 = pretmp_122 + -2;
>   pretmp_143 = a[pretmp_142];
>   pretmp_145 = pretmp_122 + -1;
>   pretmp_146 = a[pretmp_145];
>   goto <bb 4>;
> 
> With vectorization we actually unroll the inner loop but the outer one gets so
> ugly that we don't do much about it...
> 
> So what about keeping it as enhancement request? I will try to poke about it,
> but htere is but about PR overactivity of this type already, right?

Not that I know of (well there is some about PRE over-activity creating
lots of PHI nodes like this).  Yes, keep it as enhancement request
I suppose.

Does the unroller even look at PHI nodes for costs?


  parent reply	other threads:[~2013-02-12 11:07 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-20 10:23 [Bug tree-optimization/56049] New: " tkoenig at gcc dot gnu.org
2013-01-20 10:28 ` [Bug tree-optimization/56049] " tkoenig at gcc dot gnu.org
2013-01-20 10:32 ` dominiq at lps dot ens.fr
2013-01-20 17:42 ` jakub at gcc dot gnu.org
2013-01-21 13:30 ` rguenth at gcc dot gnu.org
2013-02-08 15:11 ` rguenth at gcc dot gnu.org
2013-02-11 22:02 ` aldyh at gcc dot gnu.org
2013-02-11 22:56 ` hubicka at gcc dot gnu.org
2013-02-12 11:07 ` rguenther at suse dot de [this message]
2013-02-12 14:22 ` aldyh at gcc dot gnu.org
2013-02-12 14:28 ` jakub at gcc dot gnu.org
2013-03-22 14:43 ` [Bug tree-optimization/56049] [4.8/4.9 " jakub at gcc dot gnu.org
2013-05-31 10:58 ` jakub at gcc dot gnu.org
2013-10-16  9:48 ` jakub at gcc dot gnu.org
2014-05-22  9:01 ` [Bug tree-optimization/56049] [4.8/4.9/4.10 " rguenth at gcc dot gnu.org
2014-12-19 13:25 ` [Bug tree-optimization/56049] [4.8/4.9/5 " jakub at gcc dot gnu.org
2015-06-23  8:14 ` [Bug tree-optimization/56049] [4.8/4.9/5/6 " rguenth at gcc dot gnu.org
2015-06-26 19:53 ` [Bug tree-optimization/56049] [4.9/5/6 " jakub at gcc dot gnu.org
2015-06-26 20:26 ` 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-56049-4-Dns7RHC7RV@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).