PR tree-optimization/71625 - missing strlen optimization on different array
authorMartin Sebor <msebor@redhat.com>
Wed, 15 Aug 2018 15:25:46 +0000 (15:25 +0000)
committerMartin Sebor <msebor@gcc.gnu.org>
Wed, 15 Aug 2018 15:25:46 +0000 (09:25 -0600)
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
gcc/config/aarch64/aarch64-builtins.c

index 5728118c982ebc4f60394bf743cfa223d518a6a2..8ca8b562a0e71e1a0524b571045700b9ba6b438d 100644 (file)
@@ -1,3 +1,9 @@
+2018-08-15  Martin Sebor  <msebor@redhat.com>
+
+       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  <iii@linux.ibm.com>
 
        * config/s390/s390.c (s390_reorg): Remove loop.
index 02c6738d2207d19b63f9bd429942068e92c16292..8cced94567008e28b1761ec8771589a3925f2904 100644 (file)
@@ -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 =