]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
PR bootstrap/69677
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 5 Feb 2016 09:23:03 +0000 (09:23 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 5 Feb 2016 09:23:03 +0000 (09:23 +0000)
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233167 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/i386/i386.c

index e852bc748093b36443c580b0b2bdb4d38f8baf8a..e4ed40f0ed6ad082397d5735d4e4a17687346b80 100644 (file)
@@ -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.
index 47808c4969f8cb04d0f0de1d303d99d19e34925c..1215ae45a4b58162516d9505479ed84126cab2c5 100644 (file)
@@ -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))