From 34fac449e121be97dd073c5428cc855367b2872c Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Tue, 28 Mar 2017 18:51:00 +0200 Subject: [PATCH] re PR target/53383 (Allow -mpreferred-stack-boundary=3 on x86-64) PR target/53383 * config/i386/i386.c (ix86_option_override_internal): Always allow -mincoming-stack-boundary=3 for 64-bit targets. testsuite/ChangeLog: PR target/53383 * gcc.target/i386/pr53383-1.c (dg-options): Remove -mno-sse. * gcc.target/i386/pr53383-2.c (dg-options): Ditto. * gcc.target/i386/pr53383-3.c (dg-options): Ditto. From-SVN: r246543 --- gcc/ChangeLog | 9 +++++++-- gcc/config/i386/i386.c | 5 ++--- gcc/testsuite/ChangeLog | 7 +++++++ gcc/testsuite/gcc.target/i386/pr53383-1.c | 2 +- gcc/testsuite/gcc.target/i386/pr53383-2.c | 2 +- gcc/testsuite/gcc.target/i386/pr53383-3.c | 2 +- 6 files changed, 19 insertions(+), 8 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b57d40b0863..3fa7dcf6b5a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,7 +1,12 @@ +2017-03-28 Uros Bizjak + + PR target/53383 + * config/i386/i386.c (ix86_option_override_internal): Always + allow -mincoming-stack-boundary=3 for 64-bit targets. + 2017-03-28 Bin Cheng - * tree-vect-loop.c (optimize_mask_stores): Add bb to the right - loop. + * tree-vect-loop.c (optimize_mask_stores): Add bb to the right loop. 2017-03-28 Bin Cheng diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index bb0debf54e1..6e27a09a7a9 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -5927,9 +5927,8 @@ ix86_option_override_internal (bool main_args_p, ix86_preferred_stack_boundary = PREFERRED_STACK_BOUNDARY_DEFAULT; if (opts_set->x_ix86_preferred_stack_boundary_arg) { - int min = (TARGET_64BIT_P (opts->x_ix86_isa_flags) - ? (TARGET_SSE_P (opts->x_ix86_isa_flags) ? 4 : 3) : 2); - int max = (TARGET_SEH ? 4 : 12); + int min = TARGET_64BIT_P (opts->x_ix86_isa_flags)? 3 : 2; + int max = TARGET_SEH ? 4 : 12; if (opts->x_ix86_preferred_stack_boundary_arg < min || opts->x_ix86_preferred_stack_boundary_arg > max) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 446096199d4..a3bdf1c8611 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2017-03-28 Uros Bizjak + + PR target/53383 + * gcc.target/i386/pr53383-1.c (dg-options): Remove -mno-sse. + * gcc.target/i386/pr53383-2.c (dg-options): Ditto. + * gcc.target/i386/pr53383-3.c (dg-options): Ditto. + 2017-03-28 Bin Cheng * gcc.c-torture/compile/irreducible-loop.c: New. diff --git a/gcc/testsuite/gcc.target/i386/pr53383-1.c b/gcc/testsuite/gcc.target/i386/pr53383-1.c index d140bdadead..9c58a106cbb 100644 --- a/gcc/testsuite/gcc.target/i386/pr53383-1.c +++ b/gcc/testsuite/gcc.target/i386/pr53383-1.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -mno-sse -mpreferred-stack-boundary=3" } */ +/* { dg-options "-O2 -mpreferred-stack-boundary=3" } */ int bar (int x) diff --git a/gcc/testsuite/gcc.target/i386/pr53383-2.c b/gcc/testsuite/gcc.target/i386/pr53383-2.c index a1b8e418789..3ac5bcefdc7 100644 --- a/gcc/testsuite/gcc.target/i386/pr53383-2.c +++ b/gcc/testsuite/gcc.target/i386/pr53383-2.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -mno-sse -mpreferred-stack-boundary=3 -mincoming-stack-boundary=3" } */ +/* { dg-options "-O2 -mpreferred-stack-boundary=3 -mincoming-stack-boundary=3" } */ int bar (int x) diff --git a/gcc/testsuite/gcc.target/i386/pr53383-3.c b/gcc/testsuite/gcc.target/i386/pr53383-3.c index e5d3a5b0638..810c21ad403 100644 --- a/gcc/testsuite/gcc.target/i386/pr53383-3.c +++ b/gcc/testsuite/gcc.target/i386/pr53383-3.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -mno-sse -mincoming-stack-boundary=3 -mpreferred-stack-boundary=3" } */ +/* { dg-options "-O2 -mincoming-stack-boundary=3 -mpreferred-stack-boundary=3" } */ int bar (int x) -- 2.30.2