Bug 81624 - [8 Regression] FAIL: gcc.target/i386/pr59501-3a.c scan-assembler-not and[^\n\r]*sp
Summary: [8 Regression] FAIL: gcc.target/i386/pr59501-3a.c scan-assembler-not and[^\n\...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: testsuite (show other bugs)
Version: 8.0
: P3 normal
Target Milestone: 8.0
Assignee: H.J. Lu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-31 08:01 UTC by Martin Liška
Modified: 2017-10-11 10:43 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Liška 2017-07-31 08:01:13 UTC
Starting from r250084, the test-case fails.

Thanks.
Comment 1 H.J. Lu 2017-07-31 12:56:24 UTC
A patch was posted at

https://gcc.gnu.org/ml/gcc-patches/2017-07/msg00400.html

and waiting from review from Jakub:

https://gcc.gnu.org/ml/gcc-patches/2017-07/msg01568.html

H.J.
Comment 2 Andrey Guskov 2017-08-01 08:50:25 UTC
Also having this.
Comment 3 hjl@gcc.gnu.org 2017-09-05 16:39:55 UTC
Author: hjl
Date: Tue Sep  5 16:39:24 2017
New Revision: 251718

URL: https://gcc.gnu.org/viewcvs?rev=251718&root=gcc&view=rev
Log:
i386: Avoid stack realignment if possible

ix86_finalize_stack_frame_flags has been extended to eliminate frame
pointer when the new stack frame isn't needed with and without
-maccumulate-outgoing-args as well as -fomit-frame-pointer.  Since stack
access with larger alignment may be optimized out, to decide if stack
realignment is needed, we need to not only check for stack frame access,
but also verify the alignment of stack frame access.  Since alignment of
memory access via arg_pointer is set up by caller, not by callee, we
should find the maximum stack alignment from the stack frame access
instructions via stack pointer and frame pointrer to avoid stack
realignment when stack alignment needed is less than incoming stack
boundary.

gcc/

	PR target/59501
	PR target/81624
	PR target/81769
	* config/i386/i386.c (ix86_finalize_stack_frame_flags): Don't
	realign stack if stack alignment needed is less than incoming
	stack boundary.

gcc/testsuite/

	PR target/59501
	PR target/81624
	PR target/81769
	* gcc.target/i386/pr59501-4a.c: Remove xfail.
	* gcc.target/i386/pr81769-1a.c: New test.
	* gcc.target/i386/pr81769-1b.c: Likewise.
	* gcc.target/i386/pr81769-2.c: Likewise.

Added:
    trunk/gcc/testsuite/gcc.target/i386/pr81769-1a.c
    trunk/gcc/testsuite/gcc.target/i386/pr81769-1b.c
    trunk/gcc/testsuite/gcc.target/i386/pr81769-2.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/i386.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.target/i386/pr59501-4a.c
Comment 4 Jakub Jelinek 2017-10-11 10:43:31 UTC
Assuming fixed.