From patchwork Thu Oct 22 16:21:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Enkovich X-Patchwork-Id: 534475 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id AE9C9141324 for ; Fri, 23 Oct 2015 03:21:38 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=ZiaELBPJ; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; q=dns; s=default; b=cde7is5UieFEw379m qPj2hzbeK3H9/Qkfa6IGe23wpuyObBPEgyIZ0Lb7As8cCf/tlkG3L1dmdwZqLi42 YXYF4QSOZrLqInXFiIe5fGxPvkhicTl0cCdFMD5wuk0wUsOHK1lWk+jQkg9dvVEY RKEJsK1kFJp54z2IMHqCRQaYkY= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=default; bh=1OrkIggfWun1lR+dupFLlvi QEwU=; b=ZiaELBPJQMxuFwMeFu79OwUDMID2lQoE5dLO/l0/3ulWS8frGtwuz9S 85JZwzivNRhZ7gx74JPG0/EspGhAFzhGT6eOFiPJUOeHqIg4/X9E+mR4r0zpN/24 NUnVG0JOcYYahYJfeoWs7xE38g8ns586t45ztvVfzB+lxUSFe8XM= Received: (qmail 98370 invoked by alias); 22 Oct 2015 16:21:31 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 98358 invoked by uid 89); 22 Oct 2015 16:21:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-io0-f180.google.com Received: from mail-io0-f180.google.com (HELO mail-io0-f180.google.com) (209.85.223.180) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 22 Oct 2015 16:21:29 +0000 Received: by iow1 with SMTP id 1so96725213iow.1 for ; Thu, 22 Oct 2015 09:21:27 -0700 (PDT) X-Received: by 10.107.17.199 with SMTP id 68mr16940547ior.81.1445530887885; Thu, 22 Oct 2015 09:21:27 -0700 (PDT) Received: from msticlxl57.ims.intel.com (jfdmzpr02-ext.jf.intel.com. [134.134.137.71]) by smtp.gmail.com with ESMTPSA id yq9sm6288661igb.6.2015.10.22.09.21.25 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Oct 2015 09:21:27 -0700 (PDT) Date: Thu, 22 Oct 2015 19:21:05 +0300 From: Ilya Enkovich To: Andreas Schwab Cc: gcc-patches , law@redhat.com Subject: Re: [Boolean Vector, patch 1/5] Introduce boolean vector to be used as a vector comparison type Message-ID: <20151022162105.GB23452@msticlxl57.ims.intel.com> References: <20151002135921.GE26618@msticlxl57.ims.intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes 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 error) > > > > 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 = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 > "And now for something completely different." Thanks! The problem is in wrong mboolean vector size in case target cannot provide a mode for it. I tested it on i386 with vector extension switched off, but with extensions off vector modes still exist, thus I missed this case. Here is a patch to fix it. Bootstrapped and regtested on powerpc64le-unknown-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, unsigned vector_size) gcc_assert (mask_mode != VOIDmode); - unsigned HOST_WIDE_INT esize = GET_MODE_BITSIZE (mask_mode) / nunits; - gcc_assert (esize * nunits == GET_MODE_BITSIZE (mask_mode)); + unsigned HOST_WIDE_INT vsize = GET_MODE_BITSIZE (mask_mode); + if (!vsize) + vsize = vector_size * BITS_PER_UNIT; + + unsigned HOST_WIDE_INT esize = vsize / nunits; + gcc_assert (esize * nunits == vsize); tree bool_type = build_nonstandard_boolean_type (esize);