From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 123358 invoked by alias); 3 Nov 2015 16:02:30 -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 121904 invoked by uid 89); 3 Nov 2015 16:02:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD 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, 03 Nov 2015 16:02:29 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id D0E57C0D61AD; Tue, 3 Nov 2015 16:02:27 +0000 (UTC) Received: from localhost.localdomain (ovpn-113-134.phx2.redhat.com [10.3.113.134]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tA3G2Rgk032692; Tue, 3 Nov 2015 11:02:27 -0500 Subject: Re: [Boolean Vector, patch 1/5] Introduce boolean vector to be used as a vector comparison type To: Ilya Enkovich , Bill Schmidt References: <20151022162105.GB23452@msticlxl57.ims.intel.com> <20151023111240.GC23452@msticlxl57.ims.intel.com> <1446050893.7184.0.camel@oc8801110288.ibm.com> <20151029130803.GB63456@msticlxl57.ims.intel.com> Cc: Christophe Lyon , gcc-patches From: Jeff Law Message-ID: <5638DA93.1000606@redhat.com> Date: Tue, 03 Nov 2015 16:02:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <20151029130803.GB63456@msticlxl57.ims.intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-11/txt/msg00241.txt.bz2 On 10/29/2015 07:08 AM, Ilya Enkovich wrote: > On 28 Oct 22:37, Ilya Enkovich wrote: >> Seems the problem occurs in this check in expand_vector_operations_1: >> >> /* A scalar operation pretending to be a vector one. */ >> if (VECTOR_BOOLEAN_TYPE_P (type) >> && !VECTOR_MODE_P (TYPE_MODE (type)) >> && TYPE_MODE (type) != BLKmode) >> return; >> >> This is to filter out scalar operations on boolean vectors. >> The problem here is that TYPE_MODE (type) doesn't return >> V4SImode assigned to the type but calls vector_type_mode >> instead which tries to find an integer mode for it and returns >> TImode. This causes function exit and we don't expand vector >> comparison. >> >> Suppose simple option to fix it is to change default get_mask_mode >> hook to return BLKmode in case chosen integer vector mode is not >> vector_mode_supported_p. >> >> Thanks, >> Ilya >> > > Here is a patch which fixes the problem on ARM (and on i386 with -mno-sse also). I checked it fixes the problem on ARM and also bootstrapped and checked it on x86_64-unknown-linux-gnu. Is it OK? > > Thanks, > Ilya > -- > gcc/ > > 2015-10-29 Ilya Enkovich > > * targhooks.c (default_get_mask_mode): Use BLKmode in > case target doesn't support required vector mode. > * stor-layout.c (layout_type): Check for BLKmode. And just to be clear, since Richi pointed out that we're already using BLKmode for this kind of situation, this patch is OK. Jeff