From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 54627 invoked by alias); 25 Aug 2015 21:02:38 -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 54616 invoked by uid 89); 25 Aug 2015 21:02:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 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; Tue, 25 Aug 2015 21:02:36 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id B14BA8C1AE; Tue, 25 Aug 2015 21:02:35 +0000 (UTC) Received: from localhost.localdomain (ovpn-113-93.phx2.redhat.com [10.3.113.93]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t7PL2ZIc006788; Tue, 25 Aug 2015 17:02:35 -0400 Subject: Re: [RFC][Scalar masks 1/x] Introduce GEN_MASK_EXPR. To: Ilya Enkovich References: <20150817162247.GA12565@msticlxl57.ims.intel.com> <55D61F54.1090802@redhat.com> <55D74A71.7060001@redhat.com> Cc: gcc-patches From: Jeff Law Message-ID: <55DCD7EA.8030907@redhat.com> Date: Tue, 25 Aug 2015 21:18:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-08/txt/msg01553.txt.bz2 On 08/21/2015 10:30 AM, Ilya Enkovich wrote: >> If we're checking an optab to drive an optimization, then we're probably on >> the wrong track. > > That's totally similar to VEC_COND_EXPR which we generate comparison into. It is. The vectorizer is riddled with this stuff. Sigh. So I won't consider this a negative for the scalar mask support. > >> I think this ties into the overall discussion about >> whether or not to represent these masks in gimple or try to handle them >> later during gimple->rtl expansion. > > Currently we don't have any abstraction for masks, it is supported > using vector of integers. When I expand it I have no idea whether it > is just a vector of integers to be stored or a mask to be used for > MASK_LOAD. Actually it may be used in both cases at the same time. > > Handling it in RTL means we have to undo bool->int transformation made > in GIMPLE. For trivial cases it may be easy but in generic it can be > challenging. I want to avoid it from the beginning. I wasn't suggesting handling them in RTL, but at the border between gimple and RTL. But if we can't reliably determine how a particular mask is going to be used at that point, then doing things at the gimple/RTL border may be a spectacularly bad idea ;-) jeff