From patchwork Fri Aug 17 17:18:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 959050 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-483869-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="HDAuJoIu"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.b="bsA+g6ZC"; dkim-atps=neutral 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 41sVL555jMz9s47 for ; Sat, 18 Aug 2018 03:19:08 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:cc :subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type; q=dns; s=default; b=T4siEkhd9I6iNZVzf orQR1Akoui+Uf3a/TL5ceAmR9ZgQfwNmyoOsj2CxGrrZgIgUkMpysIYhSjtEyejp P7DhTQI1u2UDyUfQ8ETTGc7TiWX3WA0y4drUVkZ6+FlXAcfBKfPmsA5HHJX2+guk wNdqF6Ol+tS5EUQMNXzMuYaVmU= 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:cc :subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type; s=default; bh=Vo8UhVxwz9oHYDQKKtilmIQ SLro=; b=HDAuJoIuhfeisRKbbnMia/uVIr0gCiudE9As7+m3JYbbGVCwyoy32mV N6A45A15SfocdsCSaNwsuAsN3tLsbNEfqOiZ0cHfnn9KX/DCX2f5aTokSjLipfGD NopPy8sjlZaeP+BSlvJs4i5nLTIICUe9X19P1hVDRECwIOZG61e8= Received: (qmail 130433 invoked by alias); 17 Aug 2018 17:19:01 -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 130408 invoked by uid 89); 17 Aug 2018 17:19:00 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.0 required=5.0 tests=BAYES_40, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 spammy=UD:aarch64-builtins.c, H*f:sk:2kGfD0Q, H*f:7MoV805ya7_9YjB, H*f:sk:e2bb35f X-HELO: EUR04-VI1-obe.outbound.protection.outlook.com Received: from mail-eopbgr80074.outbound.protection.outlook.com (HELO EUR04-VI1-obe.outbound.protection.outlook.com) (40.107.8.74) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 17 Aug 2018 17:18:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RYs+QxBnyZL5ikJloQQSWrssCYT4TKFdZERbvEx70WA=; b=bsA+g6ZC+8N0QJeiiQSnnlrVLmpfhiiCXXPBqWV89/M29C/tnGRaszkXhYv4YCyKj/hh/iew82rG/XcOqmUpER/ezhkKj1OOqvgLxv1ldRVi4MCOtM1Yo+n0vE5TVxxmetfirm2kL+UyRD91qDM7wQN4JexnOFNQZ7MPxQ8YeUM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Szabolcs.Nagy@arm.com; Received: from [10.2.206.57] (217.140.106.54) by AM6PR08MB3288.eurprd08.prod.outlook.com (2603:10a6:209:47::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1059.21; Fri, 17 Aug 2018 17:18:52 +0000 Cc: nd@arm.com, Jason Merrill , Gcc Patch List , Joseph Myers , Kyrylo Tkachov Subject: [PATCH] Fix poly types after PR tree-optimization/71625 strlen optimization To: Martin Sebor , James Greenhalgh References: <6f026f9a-9c1b-5caf-85a3-47d94ec39593@gmail.com> <64bfacf6-5bd2-5ed7-2f10-70fa64be5fc3@gmail.com> <0135318b-10c0-c693-2a89-6b5e04cf9ae3@gmail.com> From: Szabolcs Nagy Message-ID: Date: Fri, 17 Aug 2018 18:18:44 +0100 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <0135318b-10c0-c693-2a89-6b5e04cf9ae3@gmail.com> Received-SPF: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-IsSubscribed: yes 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;