From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27996 invoked by alias); 17 Aug 2018 17:22:25 -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 27986 invoked by uid 89); 17 Aug 2018 17:22:24 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY autolearn=ham version=3.3.2 spammy=Kyrill, kyrill X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 17 Aug 2018 17:22:22 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D126E7A9; Fri, 17 Aug 2018 10:22:19 -0700 (PDT) Received: from [10.2.207.77] (e100706-lin.cambridge.arm.com [10.2.207.77]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 91F173F5BC; Fri, 17 Aug 2018 10:22:18 -0700 (PDT) Message-ID: <5B770448.2020306@foss.arm.com> Date: Fri, 17 Aug 2018 17:22:00 -0000 From: Kyrill Tkachov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Szabolcs Nagy , Martin Sebor , James Greenhalgh CC: nd , Jason Merrill , Gcc Patch List , Joseph Myers Subject: Re: [PATCH] Fix poly types after PR tree-optimization/71625 strlen optimization References: <6f026f9a-9c1b-5caf-85a3-47d94ec39593@gmail.com> <64bfacf6-5bd2-5ed7-2f10-70fa64be5fc3@gmail.com> <0135318b-10c0-c693-2a89-6b5e04cf9ae3@gmail.com> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2018-08/txt/msg01044.txt.bz2 Hi Szabolcs, On 17/08/18 18:18, Szabolcs Nagy wrote: > On 15/08/18 16:51, Martin Sebor wrote: > > On 08/15/2018 04:28 AM, James Greenhalgh wrote: > >> On Tue, Aug 14, 2018 at 09:34:08PM -0500, Martin Sebor wrote: > >>> On 08/14/2018 09:24 AM, Martin Sebor wrote: > >>>> On 08/14/2018 09:08 AM, Martin Sebor wrote: > >>>> --- gcc/config/aarch64/aarch64-builtins.c (revision 263537) > >>>> +++ gcc/config/aarch64/aarch64-builtins.c (working copy) > >>>> @@ -643,6 +643,7 @@ aarch64_init_simd_builtin_types (void) > >>>> /* Poly types are a world of their own. */ > >>>> aarch64_simd_types[Poly8_t].eltype = aarch64_simd_types[Poly8_t].itype = > >>>> build_distinct_type_copy (unsigned_intQI_type_node); > >>>> + TYPE_STRING_FLAG (aarch64_simd_types[Poly8_t].eltype) = false; > >>>> aarch64_simd_types[Poly16_t].eltype = > >>>> aarch64_simd_types[Poly16_t].itype = > >>>> build_distinct_type_copy (unsigned_intHI_type_node); > >>>> aarch64_simd_types[Poly64_t].eltype = > >>>> aarch64_simd_types[Poly64_t].itype = > >> > >> This fix seems correct to me, the poly types are not strings. Looking at > >> other uses of TYPE_STRING_FLAG this change doesn't seem like it would have > >> impact on parsing or code generation. > >> > >> OK for trunk. > > > > I committed this in r263561. > > > > happens on arm too. > > Same as r263561, but for arm: avoid compilation errors caused by poly > initializers getting treated as string literals. > > Tested on arm-none-linux-gnueabihf. > > gcc/ChangeLog: > 2018-08-17 Szabolcs Nagy > > * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear > polyNxK_t element's TYPE_STRING_FLAG. diff --git a/gcc/config/arm/arm-builtins.c b/gcc/config/arm/arm-builtins.c index 183a7b907f6..563ca51dcd0 100644 --- a/gcc/config/arm/arm-builtins.c +++ b/gcc/config/arm/arm-builtins.c @@ -927,6 +927,11 @@ arm_init_simd_builtin_types (void) (*lang_hooks.types.register_builtin_type) (arm_simd_polyTI_type_node, "__builtin_neon_poly128"); + /* Prevent front-ends from transforming poly vectors into string + literals. */ + TYPE_STRING_FLAG (arm_simd_polyQI_type_node) = false; + TYPE_STRING_FLAG (arm_simd_polyHI_type_node) = false; + /* Init all the element types built by the front-end. */ arm_simd_types[Int8x8_t].eltype = intQI_type_node; arm_simd_types[Int8x16_t].eltype = intQI_type_node; Ok. Thanks, Kyrill