From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 52544 invoked by alias); 21 Aug 2015 15:44:20 -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 52529 invoked by uid 89); 21 Aug 2015 15:44:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=no 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; Fri, 21 Aug 2015 15:44:18 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 4C30392487; Fri, 21 Aug 2015 15:44:17 +0000 (UTC) Received: from localhost.localdomain (ovpn-113-201.phx2.redhat.com [10.3.113.201]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t7LFiGrq005588; Fri, 21 Aug 2015 11:44:17 -0400 Subject: Re: [Scalar masks 2/x] Use bool masks in if-conversion To: Richard Biener References: <20150817162544.GB12565@msticlxl57.ims.intel.com> <55D62076.8020105@redhat.com> Cc: Ilya Enkovich , GCC Patches From: Jeff Law Message-ID: <55D74750.2020409@redhat.com> Date: Fri, 21 Aug 2015 15:57: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/msg01321.txt.bz2 On 08/21/2015 02:15 AM, Richard Biener wrote: > > Indeed. I don't remember my exact comments during the talk at the > Cauldron but the scheme used there was sth like > > mask = GEN_MASK ; b = a + 1; x = VEC_COND > > to model conditional execution already at the if-conversion stage > (for all scalar stmts made executed unconditionally rather than just > the PHI results). I was asking for the condition to be removed from > GEN_MASK (patch 1 has this fixed now AFAICS). And I also asked why > it was necessary to do this "lowering" here and not simply do > > mask = vec1 < vec2; // regular vector mask! b = a + 1; x = VEC_COND > > > and have the lowering to an integer mask done later. You'd still > change if-conversion to predicate _all_ statements, not just those > with side-effects. So I think there still needs to be a new target > hook to trigger this, similar to how the target capabilities trigger > the masked load/store path in if-conversion. > > But I don't like changing our IL so much as to allow 'integer' masks > everywhere. Right. I'd be *much* less concerned with a hook that tells the if-converter to predicate everything and for the expander to do the lowering. We'd still have the same representation through gimple, what changes is how many statements have predication and the lowering from gimple to RTL. Contrast to a introducing a totally new way to represent predication in if-conversion and beyond, which just seems like a nightmare. jeff