[Bug target/29746] gcc fails to bootstrap on sh4-*-linux-gnu
--- Comment #18 from kkojima at gcc dot gnu dot org 2007-02-06 23:12 --- Subject: Bug 29746 Author: kkojima Date: Tue Feb 6 23:12:35 2007 New Revision: 121671 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=121671 Log: PR target/29746 * config/sh/sh.c (expand_cbranchdi4): Use scratch register properly. (sh_initialize_trampoline): Add parentheses to avoid a warning. Modified: trunk/gcc/ChangeLog trunk/gcc/config/sh/sh.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29746
[Bug target/29746] gcc fails to bootstrap on sh4-*-linux-gnu
--- Comment #19 from kkojima at gcc dot gnu dot org 2007-02-06 23:29 --- Fixed. -- kkojima at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29746
[Bug target/29746] gcc fails to bootstrap on sh4-*-linux-gnu
--- Comment #17 from patchapp at dberlin dot org 2007-01-07 00:10 --- Subject: Bug number PR target/29746 A patch for this bug has been added to the patch tracker. The mailing list url for the patch is http://gcc.gnu.org/ml/gcc-patches/2007-01/msg00494.html -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29746
[Bug target/29746] gcc fails to bootstrap on sh4-*-linux-gnu
--- Comment #16 from kkojima at gcc dot gnu dot org 2006-11-11 11:08 --- I'm testing the new softfp patch with bootstrap on sh4-unknown-linux-gnu. It isn't finished yet but already passes the compilation of ifcvt.c at stage2. No new failures on the regtest for x86 cross sh4-linux. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29746
[Bug target/29746] gcc fails to bootstrap on sh4-*-linux-gnu
--- Comment #14 from amylaar at gcc dot gnu dot org 2006-11-10 15:48 --- Created an attachment (id=12587) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12587action=view) testsuite patch This patch is needed additionally for the patch from #11. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29746
[Bug target/29746] gcc fails to bootstrap on sh4-*-linux-gnu
--- Comment #15 from amylaar at gcc dot gnu dot org 2006-11-10 17:26 --- Created an attachment (id=12589) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12589action=view) current softfp patch I've been able to reproduce the 'does not satisfy contraint' ICE using -O2 xxx.i -w -mno-expand-cbranchdi -m2 . I have amended expand_cbranchdi4 so that it properly uses the scratch register. -- amylaar at gcc dot gnu dot org changed: What|Removed |Added Attachment #12580|0 |1 is obsolete|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29746
[Bug target/29746] gcc fails to bootstrap on sh4-*-linux-gnu
--- Comment #9 from amylaar at gcc dot gnu dot org 2006-11-09 16:26 --- Created an attachment (id=12576) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12576action=view) Amended sched-deps.c patch It occurend to me that the previous patch would not do the right thing when the set is above an existing SCHED_GROUP_P group, with at least one other instruction intervening, while the use is below the group. In that case, all the dependencies of the old SCHED_GROUP_P group need to be transferred to the new group leader. -- amylaar at gcc dot gnu dot org changed: What|Removed |Added Attachment #12564|0 |1 is obsolete|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29746
[Bug target/29746] gcc fails to bootstrap on sh4-*-linux-gnu
--- Comment #10 from amylaar at gcc dot gnu dot org 2006-11-09 16:33 --- (In reply to comment #8) I don't see ICEs for the tls tests on my sh-elf build with your patches in #6 and #7. Does the new patch in #7 fix them? Yes, but I am still seeing these changes: FAIL: g++.dg/opt/reg-stack2.C (internal compiler error) FAIL: g++.dg/opt/reg-stack2.C (test for excess errors) 189a189,190 FAIL: g++.dg/opt/reg-stack2.C (internal compiler error) FAIL: g++.dg/opt/reg-stack2.C (test for excess errors) 202d202 FAIL: ext/pb_ds/regression/hash_data_map_rand.cc execution test -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29746
[Bug target/29746] gcc fails to bootstrap on sh4-*-linux-gnu
--- Comment #11 from amylaar at gcc dot gnu dot org 2006-11-09 17:28 --- Created an attachment (id=12580) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12580action=view) current software floating point patch I am testing this patch now. -- amylaar at gcc dot gnu dot org changed: What|Removed |Added Attachment #12563|0 |1 is obsolete|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29746
[Bug target/29746] gcc fails to bootstrap on sh4-*-linux-gnu
--- Comment #12 from amylaar at gcc dot gnu dot org 2006-11-09 17:37 --- (In reply to comment #8) I don't see ICEs for the tls tests on my sh-elf build with your patches in #6 and #7. Does the new patch in #7 fix them? I've confirmed that the trunk bootstraps successfully with the patch in #4 and a one-liner to suppress a bogus compile time warning. Should I send it to the list as a workaround this PR? The problem looks like another instance of the scheduler bug. Could you try the original cbranchdi_i pattern with the patch from comment #9? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29746
[Bug target/29746] gcc fails to bootstrap on sh4-*-linux-gnu
--- Comment #13 from kkojima at gcc dot gnu dot org 2006-11-09 22:42 --- I've tested the patch in #9 with the trunk (rev. 118619) and got the same ICE in #2. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29746
[Bug target/29746] gcc fails to bootstrap on sh4-*-linux-gnu
--- Comment #8 from kkojima at gcc dot gnu dot org 2006-11-08 23:53 --- I don't see ICEs for the tls tests on my sh-elf build with your patches in #6 and #7. Does the new patch in #7 fix them? I've confirmed that the trunk bootstraps successfully with the patch in #4 and a one-liner to suppress a bogus compile time warning. Should I send it to the list as a workaround this PR? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29746
[Bug target/29746] gcc fails to bootstrap on sh4-*-linux-gnu
--- Comment #6 from amylaar at gcc dot gnu dot org 2006-11-07 15:57 --- Created an attachment (id=12563) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12563action=view) current patch for software floating point In the framework of the software floating point patches, I make the early emitting of cbranchdi as separate branches the default. However, this patch set has still some issues - there are patches to generic code, and I also see ICE regressions for some of the tls tests on sh-elf. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29746
[Bug target/29746] gcc fails to bootstrap on sh4-*-linux-gnu
--- Comment #7 from amylaar at gcc dot gnu dot org 2006-11-07 17:05 --- Created an attachment (id=12564) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12564action=view) I have a new patch for sched-deps.c now. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29746
[Bug target/29746] gcc fails to bootstrap on sh4-*-linux-gnu
--- Comment #1 from kkojima at gcc dot gnu dot org 2006-11-07 02:35 --- Created an attachment (id=12556) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12556action=view) a reduced test case -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29746
[Bug target/29746] gcc fails to bootstrap on sh4-*-linux-gnu
--- Comment #2 from kkojima at gcc dot gnu dot org 2006-11-07 02:37 --- I've attached a reduced test case which fails also on the cross compiler with -O2: foo.c:69: error: insn does not satisfy its constraints: (insn 232 235 233 9 (set (reg:SI 147 t) (eq:SI (reg:SI 8 r8 [orig:169 diff ] [169]) (const_int 1 [0x1]))) 1 {cmpeqsi_t} (nil) (nil)) The .greg dump for it has a cbranchdi4_i insn (jump_insn:HI 61 222 155 8 (parallel [ (set (pc) (if_then_else (eq (reg/v:DI 8 r8 [orig:169 diff ] [169]) (reg:DI 1 r1)) (label_ref:SI 82) (pc))) (clobber (scratch:SI)) (clobber (reg:SI 147 t)) ]) 6 {cbranchdi4_i} (nil) (expr_list:REG_BR_PROB (const_int 5000 [0x1388]) (nil))) which is transformed to insns (insn 232 235 233 9 (set (reg:SI 147 t) (eq:SI (reg:SI 8 r8 [orig:169 diff ] [169]) (const_int 1 [0x1]))) 1 {cmpeqsi_t} (nil) (nil)) (jump_insn 233 232 237 9 (set (pc) (if_then_else (ne (reg:SI 147 t) (const_int 0 [0x0])) (label_ref 82) (pc))) 207 {branch_true} (nil) (expr_list:REG_BR_PROB (const_int 1 [0x2710]) (nil))) at .flow2. With the change of cbranchdi4_i insn_and_split like as --- ORIG/trunk/gcc/config/sh/sh.md 2006-11-05 10:02:45.0 +0900 +++ LOCAL/trunk/gcc/config/sh/sh.md 2006-11-07 09:45:27.0 +0900 @@ -713,7 +713,7 @@ (define_insn_and_split cbranchdi4_i [(set (pc) (if_then_else (match_operator 0 comparison_operator - [(match_operand:DI 1 arith_operand r,r) + [(match_operand:DI 1 arith_operand r,z) (match_operand:DI 2 arith_operand rN,i)]) (label_ref (match_operand 3 )) (pc))) the reduced test case doesn't fail but the original ifcvt.c fails with -O2: ../../TMP/trunk/gcc/ifcvt.c:1036: error: unable to find a register to spill in class 'R0_REGS' ../../TMP/trunk/gcc/ifcvt.c:1036: error: this is the insn: (jump_insn:HI 324 339 655 42 ../../TMP/trunk/gcc/ifcvt.c:977 (parallel [ (set (pc) (if_then_else (eq (reg/v:DI 172 [ diff ]) (const_int 1 [0x1])) (label_ref:SI 345) (pc))) (clobber (scratch:SI)) (clobber (reg:SI 147 t)) ]) 6 {cbranchdi4_i} (nil) (expr_list:REG_UNUSED (reg:SI 147 t) (expr_list:REG_UNUSED (scratch:SI) (expr_list:REG_BR_PROB (const_int 5000 [0x1388]) (nil) ../../TMP/trunk/gcc/ifcvt.c:1036: internal compiler error: in spill_failure, at reload1.c:1938 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29746
[Bug target/29746] gcc fails to bootstrap on sh4-*-linux-gnu
--- Comment #3 from kkojima at gcc dot gnu dot org 2006-11-07 02:39 --- Created an attachment (id=12558) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12558action=view) a reduced test case for the spill failure -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29746
[Bug target/29746] gcc fails to bootstrap on sh4-*-linux-gnu
--- Comment #4 from kkojima at gcc dot gnu dot org 2006-11-07 02:40 --- If the comparison with a constant is removed from cbranchdi4_i, the 2nd test case and the original ifcvt.c are compiled successfully. --- ORIG/trunk/gcc/config/sh/sh.md 2006-11-05 10:02:45.0 +0900 +++ TMP/trunk/gcc/config/sh/sh.md 2006-11-07 09:34:22.0 +0900 @@ -713,11 +713,11 @@ (define_insn_and_split cbranchdi4_i [(set (pc) (if_then_else (match_operator 0 comparison_operator - [(match_operand:DI 1 arith_operand r,r) -(match_operand:DI 2 arith_operand rN,i)]) + [(match_operand:DI 1 arith_operand r) +(match_operand:DI 2 arith_operand rN)]) (label_ref (match_operand 3 )) (pc))) - (clobber (match_scratch:SI 4 =X,r)) + (clobber (match_scratch:SI 4 =X)) (clobber (reg:SI T_REG))] TARGET_CBRANCHDI4 # -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29746
[Bug target/29746] gcc fails to bootstrap on sh4-*-linux-gnu
--- Comment #5 from kkojima at gcc dot gnu dot org 2006-11-07 02:46 --- I'd like to add Joern to the list. -- kkojima at gcc dot gnu dot org changed: What|Removed |Added CC||amylaar at gcc dot gnu dot ||org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29746