From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27380 invoked by alias); 6 Jun 2016 17:44:37 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 27342 invoked by uid 89); 6 Jun 2016 17:44:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 06 Jun 2016 17:44:31 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DD21A12633; Mon, 6 Jun 2016 17:44:28 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-116-51.ams2.redhat.com [10.36.116.51]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u56HiRg2015009 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 6 Jun 2016 13:44:28 -0400 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id u56HiP56028636; Mon, 6 Jun 2016 19:44:25 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id u56HiN9R028635; Mon, 6 Jun 2016 19:44:23 +0200 Date: Mon, 06 Jun 2016 17:44:00 -0000 From: Jakub Jelinek To: Richard Biener Cc: Ilya Enkovich , gcc-patches Subject: Re: [PATCH] Fix SLP wrong-code with VECTOR_BOOLEAN_TYPE_P (PR tree-optimization/71259) Message-ID: <20160606174423.GB7387@tucnak.redhat.com> Reply-To: Jakub Jelinek References: <20160111171343.GB18720@tucnak.redhat.com> <20160603173343.GM7387@tucnak.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-IsSubscribed: yes X-SW-Source: 2016-06/txt/msg00412.txt.bz2 On Mon, Jun 06, 2016 at 10:05:57AM +0200, Richard Biener wrote: > So this ends up generating { a ? -1 : 0, b ? -1 : 0, ... }. That Yes, that is already what we do now for loop vectorization. > might be less optimal than doing { a, b, ... } ? { -1, -1 ... } : { 0, 0, > .. } Well, it would need to be { a, b, ... } != { 0, 0, ... } ? { -1, -1, ... } : { 0, 0, ... } then, doesn't VEC_COND_EXPR assume the condition is in canonical VECTOR_BOOLEAN_TYPE_P form? Anyway, if something like the above would be faster, perhaps generic vector lowering or some similar pass could detect that case post-vectorization and optimize? Jakub