aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorChangpeng Fang <changpeng.fang@amd.com>2011-06-20 21:52:32 +0000
committerChangpeng Fang <cfang@gcc.gnu.org>2011-06-20 21:52:32 +0000
commit97ef5ae607b720d05e17808bbe18903c70dd6dac (patch)
tree51d4870f05768ae407bb70cceb7ef3fe7a6044e4 /gcc/config
parentfea549356d388607081f1a83ebac557259314d62 (diff)
downloadgcc-97ef5ae607b720d05e17808bbe18903c70dd6dac.zip
gcc-97ef5ae607b720d05e17808bbe18903c70dd6dac.tar.gz
gcc-97ef5ae607b720d05e17808bbe18903c70dd6dac.tar.bz2
pr49089: enable avx256 splitting unaligned load/store only when beneficial
* config/i386/i386.c (avx256_split_unaligned_load): New definition. (avx256_split_unaligned_store): New definition. (ix86_option_override_internal): Enable avx256 unaligned load/store splitting only when avx256_split_unaligned_load/store is set. From-SVN: r175230
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/i386/i386.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 6029010..014401b 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -2122,6 +2122,12 @@ static const unsigned int x86_arch_always_fancy_math_387
= m_PENT | m_ATOM | m_PPRO | m_AMD_MULTIPLE | m_PENT4
| m_NOCONA | m_CORE2I7 | m_GENERIC;
+static const unsigned int x86_avx256_split_unaligned_load
+ = m_COREI7 | m_GENERIC;
+
+static const unsigned int x86_avx256_split_unaligned_store
+ = m_COREI7 | m_BDVER1 | m_GENERIC;
+
/* In case the average insn count for single function invocation is
lower than this constant, emit fast (but longer) prologue and
epilogue code. */
@@ -3660,9 +3666,11 @@ ix86_option_override_internal (bool main_args_p)
if (flag_expensive_optimizations
&& !(target_flags_explicit & MASK_VZEROUPPER))
target_flags |= MASK_VZEROUPPER;
- if (!(target_flags_explicit & MASK_AVX256_SPLIT_UNALIGNED_LOAD))
+ if ((x86_avx256_split_unaligned_load & ix86_tune_mask)
+ && !(target_flags_explicit & MASK_AVX256_SPLIT_UNALIGNED_LOAD))
target_flags |= MASK_AVX256_SPLIT_UNALIGNED_LOAD;
- if (!(target_flags_explicit & MASK_AVX256_SPLIT_UNALIGNED_STORE))
+ if ((x86_avx256_split_unaligned_store & ix86_tune_mask)
+ && !(target_flags_explicit & MASK_AVX256_SPLIT_UNALIGNED_STORE))
target_flags |= MASK_AVX256_SPLIT_UNALIGNED_STORE;
}
}