From a509c571eae4cb1ab3e79c044d93b1d79bde0798 Mon Sep 17 00:00:00 2001 From: Christophe Lyon Date: Wed, 27 Sep 2017 23:52:58 +0000 Subject: [PATCH] [AArch64] PR71727 fix -mstrict-align 2017-09-27 Christophe Lyon 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 | 7 +++++++ gcc/config/aarch64/aarch64.c | 14 ++------------ gcc/testsuite/ChangeLog | 5 +++++ 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8a482744574..71b1408496a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2017-09-27 Christophe Lyon + + PR target/71727 + * config/aarch64/aarch64.c + (aarch64_builtin_support_vector_misalignment): Always return false + when misalignment is unknown. + 2017-09-27 Kelvin Nilsen * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Revise diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index 71d8dc4471e..4c411df12ce 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -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); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0b5f5ee6858..fb6ba251e93 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-09-27 Christophe Lyon + + PR target/71727 + * gcc.target/aarch64/pr71727-2.c: New test. + 2017-09-27 Kelvin Nilsen * gcc.target/powerpc/swaps-p8-28.c: New test. -- 2.30.2