From: Jakub Jelinek Date: Wed, 4 Dec 2013 11:12:04 +0000 (+0100) Subject: re PR target/59163 (program compiled with g++ -O3 segfaults) X-Git-Tag: releases/gcc-4.9.0~2293 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=77381ee7de541021dccd0030a757fc38f369993b;p=thirdparty%2Fgcc.git 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 (_loadu, _storeu, _loaddqu, _storedqu, _lddqu, 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_v8qiv8hi2, sse4_1_v4qiv4si2, sse4_1_v4hiv4si2, sse4_1_v2qiv2di2, sse4_1_v2hiv2di2, sse4_1_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 --- diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index f9b06d13b89b..7bf8c1ec0214 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))