[AArch64] PR71727 fix -mstrict-align
authorChristophe Lyon <christophe.lyon@linaro.org>
Wed, 27 Sep 2017 23:52:58 +0000 (23:52 +0000)
committerChristophe Lyon <clyon@gcc.gnu.org>
Wed, 27 Sep 2017 23:52:58 +0000 (01:52 +0200)
2017-09-27  Christophe Lyon  <christophe.lyon@linaro.org>

PR target/71727
gcc/
* config/aarch64/aarch64.c
(aarch64_builtin_support_vector_misalignment): Always return false
when misalignment is unknown.

gcc/testsuite/
* gcc.target/aarch64/pr71727-2.c: New test

From-SVN: r253242

gcc/ChangeLog
gcc/config/aarch64/aarch64.c
gcc/testsuite/ChangeLog

index 8a482744574dbc1de77e968e515bf77057a5a817..71b1408496a48d88d07ebf960863b7a3e295f018 100644 (file)
@@ -1,3 +1,10 @@
+2017-09-27  Christophe Lyon  <christophe.lyon@linaro.org>
+
+       PR target/71727
+       * config/aarch64/aarch64.c
+       (aarch64_builtin_support_vector_misalignment): Always return false
+       when misalignment is unknown.
+
 2017-09-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
 
        * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Revise
index 71d8dc4471ec141e9f11bf57663bc97686d1f100..4c411df12ce00018a47e9086bb21ea6e950e3bf1 100644 (file)
@@ -11902,19 +11902,9 @@ aarch64_builtin_support_vector_misalignment (machine_mode mode,
       if (optab_handler (movmisalign_optab, mode) == CODE_FOR_nothing)
         return false;
 
+      /* Misalignment factor is unknown at compile time.  */
       if (misalignment == -1)
-       {
-         /* Misalignment factor is unknown at compile time but we know
-            it's word aligned.  */
-         if (aarch64_simd_vector_alignment_reachable (type, is_packed))
-            {
-              int element_size = TREE_INT_CST_LOW (TYPE_SIZE (type));
-
-              if (element_size != 64)
-                return true;
-            }
-         return false;
-       }
+       return false;
     }
   return default_builtin_support_vector_misalignment (mode, type, misalignment,
                                                      is_packed);
index 0b5f5ee6858266687c61a0dfe5014fa2cb5edfa0..fb6ba251e93fcaabbb4531ee9acf1333c1eb0e79 100644 (file)
@@ -1,3 +1,8 @@
+2017-09-27  Christophe Lyon  <christophe.lyon@linaro.org>
+
+       PR target/71727
+       * gcc.target/aarch64/pr71727-2.c: New test.
+
 2017-09-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
 
        * gcc.target/powerpc/swaps-p8-28.c: New test.