From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 95347 invoked by alias); 16 Jun 2015 10:43:41 -0000 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 Received: (qmail 95048 invoked by uid 55); 16 Jun 2015 10:43:36 -0000 From: "rguenther at suse dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/56766] Fails to combine (vec_select (vec_concat ...)) to (vec_merge ...) Date: Tue, 16 Jun 2015 10:43:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenther at suse dot de X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-06/txt/msg01403.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D56766 --- Comment #25 from rguenther at suse dot de --- On Fri, 12 Jun 2015, ubizjak at gmail dot com wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D56766 >=20 > --- Comment #24 from Uro=C5=A1 Bizjak --- > (In reply to Uro=C5=A1 Bizjak from comment #23) >=20 > > Testcases, compile with "-O2 -ftree-vectorize -mavx". >=20 > Richi, please note that tree-vectorizer doesn't vectorize bar_v2df, at le= ast > there is no VEC_PERM_EXPR in the .optimized dump: >=20 > void bar_v2df (double * __restrict__ p, double * __restrict q) > { > p[0] =3D p[0] - q[0]; > p[1] =3D p[1] + q[1]; > } That's because of (unless you specify -fno-vect-cost-model): t.c:3:11: note: Cost model analysis: Vector inside of basic block cost: 9 Vector prologue cost: 0 Vector epilogue cost: 0 Scalar cost of basic block: 8 t.c:3:11: note: not vectorized: vectorization is not profitable. so it computes a too high vectorized cost. This is because the target unspecific code handling this is estimating the cost as needing both the add and the subtract and the shuffle. The target vectorizer cost hook could adjust this to a more sensible value if addsubpd is available. > Another question w.r.t. to foo_* testcases that use __builtin_shuffle: >=20 > v4sf foo_v4sf (v4sf x, v4sf y) > { > v4sf tem0 =3D x - y; > v4sf tem1 =3D x + y; > return __builtin_shuffle (tem0, tem1, (v4si) { 0, 5, 2, 7 }); > } >=20 > is functionaly equivalent to: >=20 > v4sf foo_v4sf (v4sf x, v4sf y) > { > v4sf tem0 =3D x + y; > v4sf tem1 =3D x - y; > return __builtin_shuffle (tem0, tem1, (v4si) { 4, 1, 6, 3 }); > } >=20 > But the later construct isn't simplified. Should we declare canonical for= m as > the one with "element 0 from the first operand"? That one is interesting. I'd say we'd need to define a total ordering here. Note that a canonical form is only accepted when the target accepts it (see the VEC_PERM_EXPR case in fold-const.c). So, if we can write a function compare_perm_for_canonical (unsigned char=20 *sel1, unsigned char *sel2, unsigned n) we could use that to determine if swapping arg0 and arg1 makes the permute mask more canonical. So yes, we should have a canonical form for the above and yes, we could say that we order after element0 and if that is equal after element1, and so on. >>From gcc-bugs-return-489073-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Jun 16 10:45:54 2015 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 97806 invoked by alias); 16 Jun 2015 10:45:54 -0000 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 Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 97753 invoked by uid 48); 16 Jun 2015 10:45:50 -0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/66536] [5/6 Regression] ICE in build_ctor_subob_ref, at cp/tree.c:2534 Date: Tue, 16 Jun 2015 10:45:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 6.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 5.2 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: target_milestone Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-06/txt/msg01405.txt.bz2 Content-length: 292 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66536 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |5.2