From bcee52c4b7ab4a47bb4c2426daa10f5b37968ac7 Mon Sep 17 00:00:00 2001 From: Martin Sebor Date: Wed, 15 Aug 2018 15:25:46 +0000 Subject: [PATCH] PR tree-optimization/71625 - missing strlen optimization on different array PR tree-optimization/71625 - missing strlen optimization on different array initialization style (avoid compilation errors on aarch64) gcc/ChangeLog: * config/aarch64/aarch64-builtins.c (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG. From-SVN: r263561 --- gcc/ChangeLog | 6 ++++++ gcc/config/aarch64/aarch64-builtins.c | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5728118..8ca8b56 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-08-15 Martin Sebor + + PR tree-optimization/71625 + * config/aarch64/aarch64-builtins.c + (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG. + 2018-08-15 Ilya Leoshkevich * config/s390/s390.c (s390_reorg): Remove loop. diff --git a/gcc/config/aarch64/aarch64-builtins.c b/gcc/config/aarch64/aarch64-builtins.c index 02c6738..8cced94 100644 --- a/gcc/config/aarch64/aarch64-builtins.c +++ b/gcc/config/aarch64/aarch64-builtins.c @@ -643,6 +643,10 @@ 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); + /* Prevent front-ends from transforming Poly8_t arrays into string + literals. */ + 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 = -- 2.7.4