From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 91991 invoked by alias); 23 Oct 2015 09:40:15 -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 91957 invoked by uid 89); 23 Oct 2015 09:40:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-yk0-f171.google.com Received: from mail-yk0-f171.google.com (HELO mail-yk0-f171.google.com) (209.85.160.171) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 23 Oct 2015 09:40:13 +0000 Received: by ykba4 with SMTP id a4so108148779ykb.3 for ; Fri, 23 Oct 2015 02:40:11 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.129.70.65 with SMTP id t62mr5805208ywa.240.1445593211554; Fri, 23 Oct 2015 02:40:11 -0700 (PDT) Received: by 10.37.117.136 with HTTP; Fri, 23 Oct 2015 02:40:11 -0700 (PDT) In-Reply-To: <20151022162105.GB23452@msticlxl57.ims.intel.com> References: <20151002135921.GE26618@msticlxl57.ims.intel.com> <20151022162105.GB23452@msticlxl57.ims.intel.com> Date: Fri, 23 Oct 2015 09:43:00 -0000 Message-ID: Subject: Re: [Boolean Vector, patch 1/5] Introduce boolean vector to be used as a vector comparison type From: Richard Biener To: Ilya Enkovich Cc: Andreas Schwab , gcc-patches , Jeff Law Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2015-10/txt/msg02399.txt.bz2 On Thu, Oct 22, 2015 at 6:21 PM, Ilya Enkovich wro= te: > On 22 Oct 12:37, Andreas Schwab wrote: >> Ilya Enkovich writes: >> >> > 2015-10-22 13:13 GMT+03:00 Andreas Schwab : >> >> FAIL: gcc.c-torture/compile/pr54713-1.c -O0 (internal compiler err= or) >> > >> > Can't reproduce it on i386. What's config used? >> >> http://gcc.gnu.org/ml/gcc-testresults/2015-10/msg02350.html >> http://gcc.gnu.org/ml/gcc-testresults/2015-10/msg02361.html >> http://gcc.gnu.org/ml/gcc-testresults/2015-10/msg02396.html >> >> Andreas. >> >> -- >> Andreas Schwab, SUSE Labs, schwab@suse.de >> GPG Key fingerprint =3D 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9= D7 >> "And now for something completely different." > > Thanks! > The problem is in wrong mboolean vector size in case target cannot provid= e a mode for it. I tested it on i386 with vector extension switched off, b= ut with extensions off vector modes still exist, thus I missed this case. = Here is a patch to fix it. Bootstrapped and regtested on powerpc64le-unkno= wn-linux-gnu. I see disappeared fails: > > gcc.c-torture/compile/pr54713-2.c -O0 (test for excess errors) > gcc.c-torture/compile/pr54713-3.c -O0 (test for excess errors) > > I believe other targets should be fixed as well. > > Thanks, > Ilya > -- > gcc/ > > 2015-10-22 Ilya Enkovich > > * tree.c (build_truth_vector_type): Support BLK mode > returned for boolean vector. > > > diff --git a/gcc/tree.c b/gcc/tree.c > index 7d10dd6..836b69a 100644 > --- a/gcc/tree.c > +++ b/gcc/tree.c > @@ -10654,8 +10654,12 @@ build_truth_vector_type (unsigned nunits, unsign= ed vector_size) > > gcc_assert (mask_mode !=3D VOIDmode); > > - unsigned HOST_WIDE_INT esize =3D GET_MODE_BITSIZE (mask_mode) / nunits; > - gcc_assert (esize * nunits =3D=3D GET_MODE_BITSIZE (mask_mode)); > + unsigned HOST_WIDE_INT vsize =3D GET_MODE_BITSIZE (mask_mode); > + if (!vsize) This should better check for mask_mode =3D=3D BLKmode instead? > + vsize =3D vector_size * BITS_PER_UNIT; > + > + unsigned HOST_WIDE_INT esize =3D vsize / nunits; > + gcc_assert (esize * nunits =3D=3D vsize); > > tree bool_type =3D build_nonstandard_boolean_type (esize); >