public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/37674] New: Bootstrap failure due to miscompilation of genattrtab
@ 2008-09-29 12:52 krebbel at gcc dot gnu dot org
2008-09-30 15:16 ` [Bug middle-end/37674] " krebbel at gcc dot gnu dot org
` (11 more replies)
0 siblings, 12 replies; 13+ messages in thread
From: krebbel at gcc dot gnu dot org @ 2008-09-29 12:52 UTC (permalink / raw)
To: gcc-bugs
With the patch for PR37535 applied to mainline GCC the bootstrap still fails
due to a miscompilation. The problem is that r52 is assigned to r6 what
collides with an INSN loading r6 with a parameter for a CALL.
I think the problem is created in ira_flattening. Allocno a3 is a parent of
a87. For a87 the conflict with r6 is properly recorded. Afterwards ira_flatting
merges a87 into a3 without propagating the conflict_hard_regs set. So the
conflict with r6 is lost and ira_reassign_pseudos later on assigns r52 to hard
reg r6.
There is already code in ira_flattening which propagates the conflict sets. But
the code is only enabled if propagate_p is true. This in turn seems only to get
set if the loop once merged allocnos with different regnos?! I unfortunately
don't understand this enough to come up with a patch. So I better leave that to
you :) Please contact me if you need more information.
I wasn't able to reduce the testcase (genattrtab) since it is quite difficult
to see from the code if the miscompile occurred or not.
;; a3(r52,l0) conflicts: a1(r87,l0) ......
;; total conflict hard regs: 0-6 14
;; conflict hard regs: 0-5 14
;; a87(r52,l2) conflicts: a86(r48,l2) .....
;; total conflict hard regs: 0-6 14
;; conflict hard regs: 0-6 14
...
Moving ranges of a87r52 to a3r52: [245..248] [234..243] [229..232] [218..227]
[173..189] [126..169]
...
Try assign 52(a3), cost=268: reassign to 6
--
Summary: Bootstrap failure due to miscompilation of genattrtab
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: critical
Priority: P3
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: krebbel at gcc dot gnu dot org
GCC build triplet: s390x-ibm-linux
GCC host triplet: s390x-ibm-linux
GCC target triplet: s390x-ibm-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37674
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/37674] Bootstrap failure due to miscompilation of genattrtab
2008-09-29 12:52 [Bug middle-end/37674] New: Bootstrap failure due to miscompilation of genattrtab krebbel at gcc dot gnu dot org
@ 2008-09-30 15:16 ` krebbel at gcc dot gnu dot org
2008-09-30 15:31 ` krebbel at gcc dot gnu dot org
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: krebbel at gcc dot gnu dot org @ 2008-09-30 15:16 UTC (permalink / raw)
To: gcc-bugs
--
krebbel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37674
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/37674] Bootstrap failure due to miscompilation of genattrtab
2008-09-29 12:52 [Bug middle-end/37674] New: Bootstrap failure due to miscompilation of genattrtab krebbel at gcc dot gnu dot org
2008-09-30 15:16 ` [Bug middle-end/37674] " krebbel at gcc dot gnu dot org
@ 2008-09-30 15:31 ` krebbel at gcc dot gnu dot org
2008-10-03 20:31 ` [Bug middle-end/37674] [4.4 Regression] " pinskia at gcc dot gnu dot org
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: krebbel at gcc dot gnu dot org @ 2008-09-30 15:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from krebbel at gcc dot gnu dot org 2008-09-30 15:30 -------
The failure can currently be seen bootstrapping ira-merge branch (rev.:
140776).
configure --enable-shared --with-system-zlib --enable-threads=posix
--enable-__cxa_atexit --enable-checking --enable-decimal-float
--enable-languages=c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37674
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/37674] [4.4 Regression] Bootstrap failure due to miscompilation of genattrtab
2008-09-29 12:52 [Bug middle-end/37674] New: Bootstrap failure due to miscompilation of genattrtab krebbel at gcc dot gnu dot org
2008-09-30 15:16 ` [Bug middle-end/37674] " krebbel at gcc dot gnu dot org
2008-09-30 15:31 ` krebbel at gcc dot gnu dot org
@ 2008-10-03 20:31 ` pinskia at gcc dot gnu dot org
2008-10-06 14:08 ` krebbel at gcc dot gnu dot org
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-10-03 20:31 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
Keywords| |ra, wrong-code
Summary|Bootstrap failure due to |[4.4 Regression] Bootstrap
|miscompilation of genattrtab|failure due to
| |miscompilation of genattrtab
Target Milestone|--- |4.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37674
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/37674] [4.4 Regression] Bootstrap failure due to miscompilation of genattrtab
2008-09-29 12:52 [Bug middle-end/37674] New: Bootstrap failure due to miscompilation of genattrtab krebbel at gcc dot gnu dot org
` (2 preceding siblings ...)
2008-10-03 20:31 ` [Bug middle-end/37674] [4.4 Regression] " pinskia at gcc dot gnu dot org
@ 2008-10-06 14:08 ` krebbel at gcc dot gnu dot org
2008-10-10 16:58 ` krebbel at gcc dot gnu dot org
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: krebbel at gcc dot gnu dot org @ 2008-10-06 14:08 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from krebbel at gcc dot gnu dot org 2008-10-06 14:07 -------
Just to check whether the propagation of the conflicting hard regs in
ira_flatting really is the main problem I've tried the following patch. With
that patch the ira branch bootstraps on s390x.
Index: gcc/ira-build.c
===================================================================
--- gcc/ira-build.c.orig 2008-10-06 11:16:39.000000000 +0200
+++ gcc/ira-build.c 2008-10-06 14:44:57.000000000 +0200
@@ -2147,7 +2147,7 @@ ira_flattening (int max_regno_before_emi
ira_assert (ALLOCNO_CAP_MEMBER (parent_a) == NULL);
if (ALLOCNO_MEM_OPTIMIZED_DEST (a) != NULL)
mem_dest_p = true;
- if (propagate_p)
+ /* if (propagate_p)*/
{
if (!allocno_propagated_p [ALLOCNO_NUM (parent_a)])
COPY_HARD_REG_SET (ALLOCNO_TOTAL_CONFLICT_HARD_REGS (parent_a),
I think one reason why this problem does not occur more often and not on other
targets is that on S/390 r6 is used as argument register but is also call
saved!
The conflict between r52 and hard reg r6 is recorded for an instruction which
loads the argument for a function call. Since such an INSN is most likely more
or less directly followed by a call instruction the missing propagation of
conflicting hard regs is papered over by ira_build_conflicts. This function
always adds the call clobbered registers to the conflict sets of pseudos which
are live across function calls. For r6 on S/390 this does not happen what - at
least to my understanding - reveals the bug in ira_flattening.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37674
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/37674] [4.4 Regression] Bootstrap failure due to miscompilation of genattrtab
2008-09-29 12:52 [Bug middle-end/37674] New: Bootstrap failure due to miscompilation of genattrtab krebbel at gcc dot gnu dot org
` (3 preceding siblings ...)
2008-10-06 14:08 ` krebbel at gcc dot gnu dot org
@ 2008-10-10 16:58 ` krebbel at gcc dot gnu dot org
2008-10-11 2:48 ` vmakarov at redhat dot com
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: krebbel at gcc dot gnu dot org @ 2008-10-10 16:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from krebbel at gcc dot gnu dot org 2008-10-10 16:56 -------
Vladimir could you please have a look. Mainline is still not bootstrapping on
S/390 due to this problem.
--
krebbel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |vmakarov at gcc dot gnu dot
|dot org |org
Severity|critical |blocker
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37674
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/37674] [4.4 Regression] Bootstrap failure due to miscompilation of genattrtab
2008-09-29 12:52 [Bug middle-end/37674] New: Bootstrap failure due to miscompilation of genattrtab krebbel at gcc dot gnu dot org
` (4 preceding siblings ...)
2008-10-10 16:58 ` krebbel at gcc dot gnu dot org
@ 2008-10-11 2:48 ` vmakarov at redhat dot com
2008-10-14 19:52 ` vmakarov at redhat dot com
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: vmakarov at redhat dot com @ 2008-10-11 2:48 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from vmakarov at redhat dot com 2008-10-10 20:16 -------
I am sorry that I was silent. I am working on this. Please don't worry,
Andreas. Simply I have a lot of IRA bugs. I hope the problem will be solved on
next week.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37674
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/37674] [4.4 Regression] Bootstrap failure due to miscompilation of genattrtab
2008-09-29 12:52 [Bug middle-end/37674] New: Bootstrap failure due to miscompilation of genattrtab krebbel at gcc dot gnu dot org
` (5 preceding siblings ...)
2008-10-11 2:48 ` vmakarov at redhat dot com
@ 2008-10-14 19:52 ` vmakarov at redhat dot com
2008-10-14 22:52 ` hjl at gcc dot gnu dot org
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: vmakarov at redhat dot com @ 2008-10-14 19:52 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from vmakarov at redhat dot com 2008-10-14 19:50 -------
Updating of total_conflict_hard_regs in ira-build.c::ira_flattening was
completely wrong. So I rewrite the calculation of total_conflict_hard_regs and
total_no_stack_reg_p. It is now done from the scratch. The code became more
readable and there is no visible slowdown of IRA.
I'll send a patch solving the PR later today.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37674
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/37674] [4.4 Regression] Bootstrap failure due to miscompilation of genattrtab
2008-09-29 12:52 [Bug middle-end/37674] New: Bootstrap failure due to miscompilation of genattrtab krebbel at gcc dot gnu dot org
` (6 preceding siblings ...)
2008-10-14 19:52 ` vmakarov at redhat dot com
@ 2008-10-14 22:52 ` hjl at gcc dot gnu dot org
2008-10-16 0:24 ` vmakarov at gcc dot gnu dot org
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: hjl at gcc dot gnu dot org @ 2008-10-14 22:52 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from hjl at gcc dot gnu dot org 2008-10-14 22:50 -------
Subject: Bug 37674
Author: hjl
Date: Tue Oct 14 22:49:36 2008
New Revision: 141122
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=141122
Log:
2008-10-14 Vladimir Makarov <vmakarov@redhat.com>
PR middle-end/37674
* ira-build.c (ira_flattening): Recalculate
ALLOCNO_TOTAL_NO_STACK_REG_P and ALLOCNO_TOTAL_CONFLICT_HARD_REGS
from the scratch instead of the propagation.
Modified:
branches/ira-merge/gcc/ChangeLog.ira
branches/ira-merge/gcc/ira-build.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37674
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/37674] [4.4 Regression] Bootstrap failure due to miscompilation of genattrtab
2008-09-29 12:52 [Bug middle-end/37674] New: Bootstrap failure due to miscompilation of genattrtab krebbel at gcc dot gnu dot org
` (7 preceding siblings ...)
2008-10-14 22:52 ` hjl at gcc dot gnu dot org
@ 2008-10-16 0:24 ` vmakarov at gcc dot gnu dot org
2008-10-20 11:48 ` jakub at gcc dot gnu dot org
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: vmakarov at gcc dot gnu dot org @ 2008-10-16 0:24 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from vmakarov at gcc dot gnu dot org 2008-10-16 00:23 -------
Subject: Bug 37674
Author: vmakarov
Date: Thu Oct 16 00:22:13 2008
New Revision: 141159
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=141159
Log:
2008-10-15 Vladimir Makarov <vmakarov@redhat.com>
PR middle-end/37674
* ira-build.c (ira_flattening): Recalculate
ALLOCNO_TOTAL_NO_STACK_REG_P and ALLOCNO_TOTAL_CONFLICT_HARD_REGS
from the scratch instead of the propagation.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/ira-build.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37674
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/37674] [4.4 Regression] Bootstrap failure due to miscompilation of genattrtab
2008-09-29 12:52 [Bug middle-end/37674] New: Bootstrap failure due to miscompilation of genattrtab krebbel at gcc dot gnu dot org
` (8 preceding siblings ...)
2008-10-16 0:24 ` vmakarov at gcc dot gnu dot org
@ 2008-10-20 11:48 ` jakub at gcc dot gnu dot org
2008-10-20 12:08 ` krebbel at gcc dot gnu dot org
2008-10-20 12:09 ` krebbel at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-10-20 11:48 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from jakub at gcc dot gnu dot org 2008-10-20 11:46 -------
Does s390x-linux bootstrap now (possibly with PR37815 fix as well)? Can this
be closed?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37674
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/37674] [4.4 Regression] Bootstrap failure due to miscompilation of genattrtab
2008-09-29 12:52 [Bug middle-end/37674] New: Bootstrap failure due to miscompilation of genattrtab krebbel at gcc dot gnu dot org
` (9 preceding siblings ...)
2008-10-20 11:48 ` jakub at gcc dot gnu dot org
@ 2008-10-20 12:08 ` krebbel at gcc dot gnu dot org
2008-10-20 12:09 ` krebbel at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: krebbel at gcc dot gnu dot org @ 2008-10-20 12:08 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from krebbel at gcc dot gnu dot org 2008-10-20 12:07 -------
(In reply to comment #8)
> Does s390x-linux bootstrap now (possibly with PR37815 fix as well)? Can this
> be closed?
This particular problem seems to be fixed for s390x. GCC still doesn't
bootstrap - even with the patch from PR37815. There still is a problem with
value range propagation. I'm working on this.
--
krebbel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37674
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/37674] [4.4 Regression] Bootstrap failure due to miscompilation of genattrtab
2008-09-29 12:52 [Bug middle-end/37674] New: Bootstrap failure due to miscompilation of genattrtab krebbel at gcc dot gnu dot org
` (10 preceding siblings ...)
2008-10-20 12:08 ` krebbel at gcc dot gnu dot org
@ 2008-10-20 12:09 ` krebbel at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: krebbel at gcc dot gnu dot org @ 2008-10-20 12:09 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from krebbel at gcc dot gnu dot org 2008-10-20 12:08 -------
My testcase works fine with current GCC mainline.
--
krebbel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |VERIFIED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37674
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2008-10-20 12:09 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-29 12:52 [Bug middle-end/37674] New: Bootstrap failure due to miscompilation of genattrtab krebbel at gcc dot gnu dot org
2008-09-30 15:16 ` [Bug middle-end/37674] " krebbel at gcc dot gnu dot org
2008-09-30 15:31 ` krebbel at gcc dot gnu dot org
2008-10-03 20:31 ` [Bug middle-end/37674] [4.4 Regression] " pinskia at gcc dot gnu dot org
2008-10-06 14:08 ` krebbel at gcc dot gnu dot org
2008-10-10 16:58 ` krebbel at gcc dot gnu dot org
2008-10-11 2:48 ` vmakarov at redhat dot com
2008-10-14 19:52 ` vmakarov at redhat dot com
2008-10-14 22:52 ` hjl at gcc dot gnu dot org
2008-10-16 0:24 ` vmakarov at gcc dot gnu dot org
2008-10-20 11:48 ` jakub at gcc dot gnu dot org
2008-10-20 12:08 ` krebbel at gcc dot gnu dot org
2008-10-20 12:09 ` krebbel at gcc dot gnu dot 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).