diff options
author | Jakub Jelinek <jakub@redhat.com> | 2016-02-05 10:23:03 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2016-02-05 10:23:03 +0100 |
commit | 5421e2cab2e132f51d227a4c643eee4e764d7969 (patch) | |
tree | a514962f3f918c64cb27ca6b2bfe5e2bc2d94904 /gcc | |
parent | 714fb282d85d51f367bb04751b847757e144f849 (diff) | |
download | gcc-5421e2cab2e132f51d227a4c643eee4e764d7969.zip gcc-5421e2cab2e132f51d227a4c643eee4e764d7969.tar.gz gcc-5421e2cab2e132f51d227a4c643eee4e764d7969.tar.bz2 |
re PR bootstrap/69677 (bootstrap failed with --with-arch=corei7 --with-cpu=corei7)
PR bootstrap/69677
* config/i386/i386.c (convert_scalars_to_vector): Readd stack
alignment fixes.
(ix86_option_override_internal): Disable TARGET_STV even for
-m{incoming,preferred}-stack-boundary=3.
From-SVN: r233167
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 18 |
2 files changed, 22 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e852bc7..e4ed40f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2016-02-05 Jakub Jelinek <jakub@redhat.com> + + PR bootstrap/69677 + * config/i386/i386.c (convert_scalars_to_vector): Readd stack + alignment fixes. + (ix86_option_override_internal): Disable TARGET_STV even for + -m{incoming,preferred}-stack-boundary=3. + 2016-02-03 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * config.gcc: Mark deprecated rtems targets as obsolete. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 47808c4..1215ae4 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -3588,6 +3588,16 @@ convert_scalars_to_vector () bitmap_obstack_release (NULL); df_process_deferred_rescans (); + /* Conversion means we may have 128bit register spills/fills + which require aligned stack. */ + if (converted_insns) + { + if (crtl->stack_alignment_needed < 128) + crtl->stack_alignment_needed = 128; + if (crtl->stack_alignment_estimated < 128) + crtl->stack_alignment_estimated = 128; + } + return 0; } @@ -5443,12 +5453,12 @@ ix86_option_override_internal (bool main_args_p, opts->x_target_flags |= MASK_VZEROUPPER; if (!(opts_set->x_target_flags & MASK_STV)) opts->x_target_flags |= MASK_STV; - /* Disable STV if -mpreferred-stack-boundary=2 or - -mincoming-stack-boundary=2 - the needed + /* Disable STV if -mpreferred-stack-boundary={2,3} or + -mincoming-stack-boundary={2,3} - the needed stack realignment will be extra cost the pass doesn't take into account and the pass can't realign the stack. */ - if (ix86_preferred_stack_boundary < 64 - || ix86_incoming_stack_boundary < 64) + if (ix86_preferred_stack_boundary < 128 + || ix86_incoming_stack_boundary < 128) opts->x_target_flags &= ~MASK_STV; if (!ix86_tune_features[X86_TUNE_AVX256_UNALIGNED_LOAD_OPTIMAL] && !(opts_set->x_target_flags & MASK_AVX256_SPLIT_UNALIGNED_LOAD)) |