i386.c (ix86_option_override_internal): Also disable the STV pass if -mstackrealign...
authorEric Botcazou <ebotcazou@adacore.com>
Thu, 1 Sep 2016 07:55:00 +0000 (07:55 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Thu, 1 Sep 2016 07:55:00 +0000 (07:55 +0000)
* config/i386/i386.c (ix86_option_override_internal): Also disable the
STV pass if -mstackrealign is enabled.

From-SVN: r239916

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

index 1cf6ef600ddf2db6882b289e8e6e8ff168af92bb..9f90359170ebdb5efde545f90a7848b7f63b759f 100644 (file)
@@ -1,3 +1,8 @@
+2016-09-01  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * config/i386/i386.c (ix86_option_override_internal): Also disable the
+       STV pass if -mstackrealign is enabled.
+
 2016-08-31  Ilya Verbin  <iverbin@gmail.com>
 
        * config/i386/driver-i386.c (host_detect_local_cpu): Fix detection of
index a229a7383990f1efb33b53c51d7d5c17cba0b7d2..3ac115c64f717f928eeb8085fea941383121df85 100644 (file)
@@ -5957,11 +5957,12 @@ ix86_option_override_internal (bool main_args_p,
   if (!(opts_set->x_target_flags & MASK_STV))
     opts->x_target_flags |= MASK_STV;
   /* Disable STV if -mpreferred-stack-boundary={2,3} or
-     -mincoming-stack-boundary={2,3} - the needed
+     -mincoming-stack-boundary={2,3} or -mstackrealign - 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 < 128
-      || ix86_incoming_stack_boundary < 128)
+      || ix86_incoming_stack_boundary < 128
+      || opts->x_ix86_force_align_arg_pointer)
     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))