From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 110360 invoked by alias); 3 Nov 2015 13:42:52 -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 110350 invoked by uid 89); 3 Nov 2015 13:42:51 -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 13:42:50 +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 A70908F4F8; Tue, 3 Nov 2015 13:42:49 +0000 (UTC) Received: from localhost.localdomain (ovpn-113-134.phx2.redhat.com [10.3.113.134]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tA3Dgn7s012742; Tue, 3 Nov 2015 08:42:49 -0500 Subject: Re: [Boolean Vector, patch 1/5] Introduce boolean vector to be used as a vector comparison type To: Richard Biener 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> <5637BC60.4050702@redhat.com> Cc: Ilya Enkovich , Bill Schmidt , Christophe Lyon , gcc-patches From: Jeff Law Message-ID: <5638B9D8.8030002@redhat.com> Date: Tue, 03 Nov 2015 13:42: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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-11/txt/msg00200.txt.bz2 On 11/03/2015 04:26 AM, Richard Biener wrote: > On Mon, Nov 2, 2015 at 8:41 PM, Jeff Law wrote: >> 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. >> >> VOIDmode would probably be a better choice than BLKmode to signal when the >> target doesn't support the required vector mode. > > Though we're using BLKmode vectors in all other cases to signal that. If that's the case in the vetorizer then let's stay consistent with that existing practice in the vectorizer. jeff