From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1805 invoked by alias); 12 Feb 2013 11:07:12 -0000 Received: (qmail 1611 invoked by uid 55); 12 Feb 2013 11:06:27 -0000 From: "rguenther at suse dot de" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenther at suse dot de X-Bugzilla-Status: NEW X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.0 X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2013-02/txt/msg01150.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56049 --- Comment #6 from 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 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: > > : > a = {}; > > : > # 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)> > > : > # S.0_90 = PHI > # prephitmp_126 = PHI > # prephitmp_129 = PHI > # prephitmp_132 = PHI > # prephitmp_135 = PHI > # prephitmp_138 = PHI > # prephitmp_141 = PHI > # prephitmp_144 = PHI > # prephitmp_147 = PHI > # ivtmp_43 = PHI > _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 ; > else > goto ; > > : > 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 ; > > 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?