aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@gcc.gnu.org>2013-12-04 12:12:04 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2013-12-04 12:12:04 +0100
commit77381ee7de541021dccd0030a757fc38f369993b (patch)
tree1e7231a3d81ac22559f693a55d561f8ae7463d8d
parenta1d7a124b9f3940943890c6d1da2b0d2b5219f7e (diff)
downloadgcc-77381ee7de541021dccd0030a757fc38f369993b.zip
gcc-77381ee7de541021dccd0030a757fc38f369993b.tar.gz
gcc-77381ee7de541021dccd0030a757fc38f369993b.tar.bz2
re PR target/59163 (program compiled with g++ -O3 segfaults)
PR target/59163 * config/i386/i386.c (ix86_legitimate_combined_insn): If for !TARGET_AVX there is misaligned MEM operand with vector mode and get_attr_ssememalign is 0, return false. (ix86_expand_special_args_builtin): Add get_pointer_alignment computed alignment and for non-temporal loads/stores also at least GET_MODE_ALIGNMENT as MEM_ALIGN. * config/i386/sse.md (<sse>_loadu<ssemodesuffix><avxsizesuffix><mask_name>, <sse>_storeu<ssemodesuffix><avxsizesuffix>, <sse2_avx_avx512f>_loaddqu<mode><mask_name>, <sse2_avx_avx512f>_storedqu<mode>, <sse3>_lddqu<avxsizesuffix>, sse_vmrcpv4sf2, sse_vmrsqrtv4sf2, sse2_cvtdq2pd, sse_movhlps, sse_movlhps, sse_storehps, sse_loadhps, sse_loadlps, *vec_interleave_highv2df, *vec_interleave_lowv2df, *vec_extractv2df_1_sse, sse2_movsd, sse4_1_<code>v8qiv8hi2, sse4_1_<code>v4qiv4si2, sse4_1_<code>v4hiv4si2, sse4_1_<code>v2qiv2di2, sse4_1_<code>v2hiv2di2, sse4_1_<code>v2siv2di2, sse4_2_pcmpestr, *sse4_2_pcmpestr_unaligned, sse4_2_pcmpestri, sse4_2_pcmpestrm, sse4_2_pcmpestr_cconly, sse4_2_pcmpistr, *sse4_2_pcmpistr_unaligned, sse4_2_pcmpistri, sse4_2_pcmpistrm, sse4_2_pcmpistr_cconly): Add ssememalign attribute. * config/i386/i386.md (ssememalign): New define_attr. * g++.dg/torture/pr59163.C: New test. From-SVN: r205663
-rw-r--r--gcc/config/i386/i386.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index f9b06d1..7bf8c1e 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -32649,7 +32649,7 @@ ix86_expand_special_args_builtin (const struct builtin_description *d,
on it. Try to improve it using get_pointer_alignment,
and if the special builtin is one that requires strict
mode alignment, also from it's GET_MODE_ALIGNMENT.
- Failure to do so could leak to ix86_legitimate_combined_insn
+ Failure to do so could lead to ix86_legitimate_combined_insn
rejecting all changes to such insns. */
unsigned int align = get_pointer_alignment (arg);
if (aligned_mem && align < GET_MODE_ALIGNMENT (tmode))
@@ -32705,7 +32705,7 @@ ix86_expand_special_args_builtin (const struct builtin_description *d,
on it. Try to improve it using get_pointer_alignment,
and if the special builtin is one that requires strict
mode alignment, also from it's GET_MODE_ALIGNMENT.
- Failure to do so could leak to ix86_legitimate_combined_insn
+ Failure to do so could lead to ix86_legitimate_combined_insn
rejecting all changes to such insns. */
unsigned int align = get_pointer_alignment (arg);
if (aligned_mem && align < GET_MODE_ALIGNMENT (mode))