* [Bug target/43437] ICE in CSE, during libgcc build
2010-03-19 1:24 [Bug target/43437] New: build error segher at gcc dot gnu dot org
@ 2010-03-19 2:25 ` segher at gcc dot gnu dot org
2010-03-19 15:49 ` aldyh at gcc dot gnu dot org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: segher at gcc dot gnu dot org @ 2010-03-19 2:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from segher at gcc dot gnu dot org 2010-03-19 02:25 -------
Caused by / exposed by SVN r157476
Author: jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Tue Mar 16 10:50:42 2010 +0000
PR debug/43051
PR debug/43092
...
--
segher at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|build error |ICE in CSE, during libgcc
| |build
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43437
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/43437] ICE in CSE, during libgcc build
2010-03-19 1:24 [Bug target/43437] New: build error segher at gcc dot gnu dot org
2010-03-19 2:25 ` [Bug target/43437] ICE in CSE, during libgcc build segher at gcc dot gnu dot org
@ 2010-03-19 15:49 ` aldyh at gcc dot gnu dot org
2010-03-19 15:58 ` aldyh at gcc dot gnu dot org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: aldyh at gcc dot gnu dot org @ 2010-03-19 15:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from aldyh at gcc dot gnu dot org 2010-03-19 15:48 -------
Created an attachment (id=20141)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20141&action=view)
reduced testcase
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43437
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/43437] ICE in CSE, during libgcc build
2010-03-19 1:24 [Bug target/43437] New: build error segher at gcc dot gnu dot org
2010-03-19 2:25 ` [Bug target/43437] ICE in CSE, during libgcc build segher at gcc dot gnu dot org
2010-03-19 15:49 ` aldyh at gcc dot gnu dot org
@ 2010-03-19 15:58 ` aldyh at gcc dot gnu dot org
2010-03-19 17:35 ` jakub at gcc dot gnu dot org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: aldyh at gcc dot gnu dot org @ 2010-03-19 15:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from aldyh at gcc dot gnu dot org 2010-03-19 15:58 -------
Reproduce with: ./cc1 -g -O a.i -mscore3
--
aldyh at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2010-03-19 15:58:32
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43437
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/43437] ICE in CSE, during libgcc build
2010-03-19 1:24 [Bug target/43437] New: build error segher at gcc dot gnu dot org
` (2 preceding siblings ...)
2010-03-19 15:58 ` aldyh at gcc dot gnu dot org
@ 2010-03-19 17:35 ` jakub at gcc dot gnu dot org
2010-03-19 18:41 ` aldyh at gcc dot gnu dot org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-03-19 17:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from jakub at gcc dot gnu dot org 2010-03-19 17:35 -------
Ah, I see. We have
(insn/f 93 8 94 2 pr43437.c:4 (parallel [
(set/f (mem:SI (pre_dec:SI (reg/f:SI 0 r0)) [0 S4 A32])
(reg:SI 12 r12))
(set/f (mem:SI (pre_dec:SI (reg/f:SI 0 r0)) [0 S4 A32])
(reg:SI 13 r13))
(set/f (mem:SI (pre_dec:SI (reg/f:SI 0 r0)) [0 S4 A32])
(reg:SI 14 r14))
(set/f (mem:SI (pre_dec:SI (reg/f:SI 0 r0)) [0 S4 A32])
(reg:SI 15 r15))
]) 159 {*score.md:3032} (expr_list:REG_DEAD (reg:SI 15 r15)
(expr_list:REG_DEAD (reg:SI 14 r14)
(expr_list:REG_DEAD (reg:SI 13 r13)
(expr_list:REG_DEAD (reg:SI 12 r12)
(nil))))))
and adjust_insn turns that into:
(insn/f 93 8 94 2 pr43437.c:4 (parallel [
(set/f (mem:SI (plus:SI (reg/f:SI 54 _frame)
(const_int -20 [0xffffffffffffffec])) [0 S4 A32])
(reg:SI 12 r12))
(set/f (mem:SI (plus:SI (reg/f:SI 54 _frame)
(const_int -20 [0xffffffffffffffec])) [0 S4 A32])
(reg:SI 13 r13))
(set/f (mem:SI (plus:SI (reg/f:SI 54 _frame)
(const_int -20 [0xffffffffffffffec])) [0 S4 A32])
(reg:SI 14 r14))
(set/f (mem:SI (plus:SI (reg/f:SI 54 _frame)
(const_int -20 [0xffffffffffffffec])) [0 S4 A32])
(reg:SI 15 r15))
(set (reg/f:SI 0 r0)
(plus:SI (reg/f:SI 0 r0)
(const_int -4 [0xfffffffffffffffc])))
(set (reg/f:SI 0 r0)
(plus:SI (reg/f:SI 0 r0)
(const_int -4 [0xfffffffffffffffc])))
(set (reg/f:SI 0 r0)
(plus:SI (reg/f:SI 0 r0)
(const_int -4 [0xfffffffffffffffc])))
(set (reg/f:SI 0 r0)
(plus:SI (reg/f:SI 0 r0)
(const_int -4 [0xfffffffffffffffc])))
]) 159 {*score.md:3032} (expr_list:REG_DEAD (reg:SI 15 r15)
(expr_list:REG_DEAD (reg:SI 14 r14)
(expr_list:REG_DEAD (reg:SI 13 r13)
(expr_list:REG_DEAD (reg:SI 12 r12)
(nil))))))
I was assuming more than one autoinc with the same reg doesn't appear in any
port, apparently it does. Guess adjust_insn could detect this and merge all
the adjustments against the same reg into one.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |jakub at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
Last reconfirmed|2010-03-19 15:58:32 |2010-03-19 17:35:01
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43437
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/43437] ICE in CSE, during libgcc build
2010-03-19 1:24 [Bug target/43437] New: build error segher at gcc dot gnu dot org
` (3 preceding siblings ...)
2010-03-19 17:35 ` jakub at gcc dot gnu dot org
@ 2010-03-19 18:41 ` aldyh at gcc dot gnu dot org
2010-03-19 20:37 ` jakub at gcc dot gnu dot org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: aldyh at gcc dot gnu dot org @ 2010-03-19 18:41 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from aldyh at gcc dot gnu dot org 2010-03-19 18:41 -------
Err, I was just going to say that. Curse you Jakub. Let me know when you're
looking at something so we don't duplicate efforts. Wait, am I not supposed to
say curse on a PR? Oh well.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43437
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/43437] ICE in CSE, during libgcc build
2010-03-19 1:24 [Bug target/43437] New: build error segher at gcc dot gnu dot org
` (4 preceding siblings ...)
2010-03-19 18:41 ` aldyh at gcc dot gnu dot org
@ 2010-03-19 20:37 ` jakub at gcc dot gnu dot org
2010-03-19 21:14 ` jakub at gcc dot gnu dot org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-03-19 20:37 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from jakub at gcc dot gnu dot org 2010-03-19 20:37 -------
Created an attachment (id=20144)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20144&action=view)
gcc45-pr43437.patch
Possible patch. Except that note_uses (and note_stores) walk parallels from
end to start, so as first the side effects for r15 store are replaced etc. Not
sure what the insn really does, if it expects the storing to be done first
parallel goes to r0 - 4, second to r0 - 8, third to r0 - 12 and fourth to r0 -
16, or
first to r0 - 16, second to r0 - 12, third to r0 - 8 and fourth to r0 - 4.
To me this sounds very much like multiple side-effects in one statement in C,
I'd say doing this should be invalid RTL.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43437
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/43437] ICE in CSE, during libgcc build
2010-03-19 1:24 [Bug target/43437] New: build error segher at gcc dot gnu dot org
` (5 preceding siblings ...)
2010-03-19 20:37 ` jakub at gcc dot gnu dot org
@ 2010-03-19 21:14 ` jakub at gcc dot gnu dot org
2010-03-22 16:13 ` law at redhat dot com
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-03-19 21:14 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from jakub at gcc dot gnu dot org 2010-03-19 21:14 -------
I really think it is score backend that should be fixed here.
Say the store multiple should be represented with
(insn/f 93 8 94 2 pr43437.c:4 (parallel [
(set/f (mem:SI (plus:SI (reg/f:SI 0 r0) (const_int -4
[0xfffffffffffffffc])) [0 S4 A32])
(reg:SI 12 r12))
(set/f (mem:SI (plus:SI (reg/f:SI 0 r0) (const_int -8
[0xfffffffffffffff8])) [0 S4 A32])
(reg:SI 13 r13))
(set/f (mem:SI (plus:SI (reg/f:SI 0 r0) (const_int -12
[0xfffffffffffffff4])) [0 S4 A32])
(reg:SI 14 r14))
(set/f (mem:SI (plus:SI (reg/f:SI 0 r0) (const_int -16
[0xfffffffffffffff0])) [0 S4 A32])
(reg:SI 15 r15))
(set/f (reg/f:SI 0 r0) ((plus:SI (reg/f:SI 0 r0) (const_int -16
[0xfffffffffffffff0])))
]) 159 {*score.md:3032} (expr_list:REG_DEAD (reg:SI 15 r15)
(expr_list:REG_DEAD (reg:SI 14 r14)
(expr_list:REG_DEAD (reg:SI 13 r13)
(expr_list:REG_DEAD (reg:SI 12 r12)
(nil))))))
assuming the regs are meant to be pushed in that order (or the other order of
the adjustments). No single insn should have more than one side-effect on one
register.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |liqin at gcc dot gnu dot org
AssignedTo|jakub at gcc dot gnu dot org|unassigned at gcc dot gnu
| |dot org
Status|ASSIGNED |NEW
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43437
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/43437] ICE in CSE, during libgcc build
2010-03-19 1:24 [Bug target/43437] New: build error segher at gcc dot gnu dot org
` (6 preceding siblings ...)
2010-03-19 21:14 ` jakub at gcc dot gnu dot org
@ 2010-03-22 16:13 ` law at redhat dot com
2010-07-23 11:48 ` jakub at gcc dot gnu dot org
2010-07-23 11:57 ` segher at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: law at redhat dot com @ 2010-03-22 16:13 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from law at redhat dot com 2010-03-22 16:12 -------
I'd tend to agree with comment #7 -- multiple side effects on a single register
in a single insn like this seems like a huge rats nest of problems.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43437
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/43437] ICE in CSE, during libgcc build
2010-03-19 1:24 [Bug target/43437] New: build error segher at gcc dot gnu dot org
` (7 preceding siblings ...)
2010-03-22 16:13 ` law at redhat dot com
@ 2010-07-23 11:48 ` jakub at gcc dot gnu dot org
2010-07-23 11:57 ` segher at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-07-23 11:48 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from jakub at gcc dot gnu dot org 2010-07-23 11:48 -------
*** Bug 45040 has been marked as a duplicate of this bug. ***
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43437
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/43437] ICE in CSE, during libgcc build
2010-03-19 1:24 [Bug target/43437] New: build error segher at gcc dot gnu dot org
` (8 preceding siblings ...)
2010-07-23 11:48 ` jakub at gcc dot gnu dot org
@ 2010-07-23 11:57 ` segher at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: segher at gcc dot gnu dot org @ 2010-07-23 11:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from segher at gcc dot gnu dot org 2010-07-23 11:57 -------
Liqin, could you look at this please?
--
segher at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |liqin at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43437
^ permalink raw reply [flat|nested] 11+ messages in thread