public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/54921] New: [4.8 Regression] wrong code with -Os -fno-omit-frame-pointer -fsched2-use-superblocks -fstack-protector -ftree-slp-vectorize
@ 2012-10-13 15:46 zsojka at seznam dot cz
2012-10-15 9:46 ` [Bug middle-end/54921] " rguenth at gcc dot gnu.org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: zsojka at seznam dot cz @ 2012-10-13 15:46 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54921
Bug #: 54921
Summary: [4.8 Regression] wrong code with -Os
-fno-omit-frame-pointer -fsched2-use-superblocks
-fstack-protector -ftree-slp-vectorize
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: zsojka@seznam.cz
Created attachment 28441
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28441
reduced testcase
Output:
$ gcc -Os -fno-omit-frame-pointer -fsched2-use-superblocks -fstack-protector
-ftree-slp-vectorize testcase.c
$ ./a.out
Aborted
(gdb) p a
$1 = {a = 1, b = '\000' <repeats 31 times>}
(gdb) p b
$2 = {a = 2, b = '\000' <repeats 31 times>}
Tested revisions:
r192420 - fail
4.7 r191640 - OK
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/54921] [4.8 Regression] wrong code with -Os -fno-omit-frame-pointer -fsched2-use-superblocks -fstack-protector -ftree-slp-vectorize
2012-10-13 15:46 [Bug middle-end/54921] New: [4.8 Regression] wrong code with -Os -fno-omit-frame-pointer -fsched2-use-superblocks -fstack-protector -ftree-slp-vectorize zsojka at seznam dot cz
@ 2012-10-15 9:46 ` rguenth at gcc dot gnu.org
2012-10-22 13:38 ` mpolacek at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-10-15 9:46 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54921
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.8.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/54921] [4.8 Regression] wrong code with -Os -fno-omit-frame-pointer -fsched2-use-superblocks -fstack-protector -ftree-slp-vectorize
2012-10-13 15:46 [Bug middle-end/54921] New: [4.8 Regression] wrong code with -Os -fno-omit-frame-pointer -fsched2-use-superblocks -fstack-protector -ftree-slp-vectorize zsojka at seznam dot cz
2012-10-15 9:46 ` [Bug middle-end/54921] " rguenth at gcc dot gnu.org
@ 2012-10-22 13:38 ` mpolacek at gcc dot gnu.org
2012-10-23 11:22 ` jakub at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2012-10-22 13:38 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54921
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-10-22
CC| |mpolacek at gcc dot gnu.org
Ever Confirmed|0 |1
--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> 2012-10-22 13:38:20 UTC ---
Confirmed.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/54921] [4.8 Regression] wrong code with -Os -fno-omit-frame-pointer -fsched2-use-superblocks -fstack-protector -ftree-slp-vectorize
2012-10-13 15:46 [Bug middle-end/54921] New: [4.8 Regression] wrong code with -Os -fno-omit-frame-pointer -fsched2-use-superblocks -fstack-protector -ftree-slp-vectorize zsojka at seznam dot cz
2012-10-15 9:46 ` [Bug middle-end/54921] " rguenth at gcc dot gnu.org
2012-10-22 13:38 ` mpolacek at gcc dot gnu.org
@ 2012-10-23 11:22 ` jakub at gcc dot gnu.org
2012-11-07 13:14 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-10-23 11:22 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54921
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-10-23 11:21:55 UTC ---
Looks to be cselib + find_base_term related.
We have:
49 bp=sp
50 sp=sp-0x30
...
46 r8=bp-0x30
47 r9=r8+0x4
...
43 di=r9
17 {cx=0;di=cx<<0x2+di;[di]=0;use ax;...}
18 [bp-0x2c]=si
The reason for insn 46 and 47 being separate is that r8 is used later on.
When sched-deps.c asks whether there is any output_dependence in between
the insn 17 (rep_stossi) and insn 18 stores, it returns that there is not, even
when there is. This is because the bp-0x2c store is value:2 - 0x2c, where
find_base_term (value:2) is (address:DI -4), i.e. HFP base, while when calling
find_base_term on the value for di (== r9), it uses the loc value of r8 + 4
and value of r8 has sp register among its locs (in addition to value:2 - 0x30),
so find_base_term on the value of di returns (address:DI -1), i.e. sp based,
and
thus base_alias_check returns 0.
I'm afraid if alias.c wants to argue that sp based accesses can't alias with
hfp based accesses with frame_pointer_needed, perhaps cselib.c needs to do what
I've done so far in var-tracking.c, in particular right after the assignment to
hard frame pointer in the prologue do cselib_invalidate_rtx
(stack_pointer_rtx);
so that sp based VALUEs don't have hfp anywhere in locs and similarly hfp based
VALUEs don't have sp anywhere in locs.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/54921] [4.8 Regression] wrong code with -Os -fno-omit-frame-pointer -fsched2-use-superblocks -fstack-protector -ftree-slp-vectorize
2012-10-13 15:46 [Bug middle-end/54921] New: [4.8 Regression] wrong code with -Os -fno-omit-frame-pointer -fsched2-use-superblocks -fstack-protector -ftree-slp-vectorize zsojka at seznam dot cz
` (2 preceding siblings ...)
2012-10-23 11:22 ` jakub at gcc dot gnu.org
@ 2012-11-07 13:14 ` jakub at gcc dot gnu.org
2012-11-19 18:08 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-11-07 13:14 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54921
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |jakub at gcc dot gnu.org
|gnu.org |
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-11-07 13:14:17 UTC ---
http://gcc.gnu.org/ml/gcc-patches/2012-10/msg02035.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/54921] [4.8 Regression] wrong code with -Os -fno-omit-frame-pointer -fsched2-use-superblocks -fstack-protector -ftree-slp-vectorize
2012-10-13 15:46 [Bug middle-end/54921] New: [4.8 Regression] wrong code with -Os -fno-omit-frame-pointer -fsched2-use-superblocks -fstack-protector -ftree-slp-vectorize zsojka at seznam dot cz
` (3 preceding siblings ...)
2012-11-07 13:14 ` jakub at gcc dot gnu.org
@ 2012-11-19 18:08 ` jakub at gcc dot gnu.org
2012-11-20 8:35 ` jakub at gcc dot gnu.org
2012-11-20 8:40 ` jakub at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-11-19 18:08 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54921
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-11-19 18:07:33 UTC ---
Created attachment 28735
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28735
gcc48-pr54921.patch
Untested updated patch.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/54921] [4.8 Regression] wrong code with -Os -fno-omit-frame-pointer -fsched2-use-superblocks -fstack-protector -ftree-slp-vectorize
2012-10-13 15:46 [Bug middle-end/54921] New: [4.8 Regression] wrong code with -Os -fno-omit-frame-pointer -fsched2-use-superblocks -fstack-protector -ftree-slp-vectorize zsojka at seznam dot cz
` (4 preceding siblings ...)
2012-11-19 18:08 ` jakub at gcc dot gnu.org
@ 2012-11-20 8:35 ` jakub at gcc dot gnu.org
2012-11-20 8:40 ` jakub at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-11-20 8:35 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54921
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-11-20 08:34:51 UTC ---
Author: jakub
Date: Tue Nov 20 08:34:43 2012
New Revision: 193647
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=193647
Log:
PR rtl-optimization/54921
* cselib.h (fp_setter_insn): New prototype.
* cselib.c (fp_setter_insn): New function.
(cselib_process_insn): If frame_pointer_needed,
call cselib_invalidate_rtx (stack_pointer_rtx) after
processing a frame pointer setter.
* var-tracking.c (fp_setter): Removed.
(vt_initialize): Use fp_setter_insn instead of fp_setter.
* gcc.dg/pr54921.c: New test.
Added:
trunk/gcc/testsuite/gcc.dg/pr54921.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/cselib.c
trunk/gcc/cselib.h
trunk/gcc/testsuite/ChangeLog
trunk/gcc/var-tracking.c
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/54921] [4.8 Regression] wrong code with -Os -fno-omit-frame-pointer -fsched2-use-superblocks -fstack-protector -ftree-slp-vectorize
2012-10-13 15:46 [Bug middle-end/54921] New: [4.8 Regression] wrong code with -Os -fno-omit-frame-pointer -fsched2-use-superblocks -fstack-protector -ftree-slp-vectorize zsojka at seznam dot cz
` (5 preceding siblings ...)
2012-11-20 8:35 ` jakub at gcc dot gnu.org
@ 2012-11-20 8:40 ` jakub at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-11-20 8:40 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54921
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-11-20 08:39:58 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-11-20 8:40 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-13 15:46 [Bug middle-end/54921] New: [4.8 Regression] wrong code with -Os -fno-omit-frame-pointer -fsched2-use-superblocks -fstack-protector -ftree-slp-vectorize zsojka at seznam dot cz
2012-10-15 9:46 ` [Bug middle-end/54921] " rguenth at gcc dot gnu.org
2012-10-22 13:38 ` mpolacek at gcc dot gnu.org
2012-10-23 11:22 ` jakub at gcc dot gnu.org
2012-11-07 13:14 ` jakub at gcc dot gnu.org
2012-11-19 18:08 ` jakub at gcc dot gnu.org
2012-11-20 8:35 ` jakub at gcc dot gnu.org
2012-11-20 8:40 ` jakub at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).