From: Kyrill Tkachov <kyrylo.tkachov@foss.arm.com>
To: Szabolcs Nagy <Szabolcs.Nagy@arm.com>,
Martin Sebor <msebor@gmail.com>,
James Greenhalgh <James.Greenhalgh@arm.com>
Cc: nd <nd@arm.com>, Jason Merrill <jason@redhat.com>,
Gcc Patch List <gcc-patches@gcc.gnu.org>,
Joseph Myers <joseph@codesourcery.com>
Subject: Re: [PATCH] Fix poly types after PR tree-optimization/71625 strlen optimization
Date: Fri, 17 Aug 2018 17:22:00 -0000 [thread overview]
Message-ID: <5B770448.2020306@foss.arm.com> (raw)
In-Reply-To: <fac19fd2-faf4-4307-c08b-a3c8d9a07f5e@arm.com>
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 <szabolcs.nagy@arm.com>
>
> * 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
next prev parent reply other threads:[~2018-08-17 17:22 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-30 23:51 [PATCH] convert braced initializers to strings (PR 71625) Martin Sebor
2018-07-31 13:39 ` Jason Merrill
2018-07-31 14:49 ` Martin Sebor
2018-08-07 8:58 ` Jason Merrill
2018-08-07 23:04 ` Martin Sebor
2018-08-08 11:09 ` Jason Merrill
2018-08-09 0:17 ` Martin Sebor
2018-08-09 22:07 ` Joseph Myers
2018-08-13 10:36 ` Jason Merrill
2018-08-14 13:27 ` James Greenhalgh
2018-08-14 15:08 ` Martin Sebor
2018-08-14 15:24 ` Martin Sebor
2018-08-15 2:34 ` Martin Sebor
2018-08-15 10:29 ` James Greenhalgh
2018-08-15 15:04 ` Richard Biener
2018-08-15 15:51 ` Martin Sebor
2018-08-17 17:19 ` [PATCH] Fix poly types after PR tree-optimization/71625 strlen optimization Szabolcs Nagy
2018-08-17 17:22 ` Kyrill Tkachov [this message]
2018-08-14 21:14 ` [PATCH] convert braced initializers to strings (PR 71625) Joseph Myers
2018-08-14 22:18 ` Martin Sebor
2018-08-15 12:07 ` Joseph Myers
2018-08-15 21:02 ` Martin Sebor
2018-08-15 21:14 ` Jeff Law
2018-08-15 21:34 ` Jeff Law
2018-08-16 15:23 ` Martin Sebor
2018-08-16 15:32 ` Jeff Law
2018-08-06 16:41 ` Martin Sebor
2018-08-06 17:04 ` Joseph Myers
2018-08-07 2:02 ` Martin Sebor
2018-08-07 11:31 ` Joseph Myers
2018-08-07 23:05 ` Martin Sebor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5B770448.2020306@foss.arm.com \
--to=kyrylo.tkachov@foss.arm.com \
--cc=James.Greenhalgh@arm.com \
--cc=Szabolcs.Nagy@arm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jason@redhat.com \
--cc=joseph@codesourcery.com \
--cc=msebor@gmail.com \
--cc=nd@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).